menu

arrow_back Not displaying objects of a certain url address?

by
1 vote
6055e19a7f1db485850123.png6055e1a297a6d408721857.png

Objects with the name new building and commercial are not displayed
https://github.com/Alexey411/aspnetcore

1 comment

Why aren't there any project files in the rep?

1 Answer

by
0 votes
I answered in a similar question to yours. I described everything there. Look for solutions to such easy questions yourself, the literature is full. Otherwise how will you learn to program, on the forum?

3 Comments

Roman Thank you)
Alexxxey_enot , because you don't have CategoryId defined in your model, Id is defined
You write superfluous code that essentially does the same thing, then why do you need it if you can make it simpler
var realty = _allRealty.Realty.Where(i => i.Category == c).OrderBy(i => i.id); 

var realtyobj = new RealtyListViewModel
{
allRealty = realty,
CategoryId = id
};


ViewBag.Title = "Недвижимость";


return View(realtyobj);
Roman Yes, it's just time is pressing a lot to solve this problem urgently. I almost found a solution to this problem, but I can't implement it yet
https://github.com/Alexey411/MVC 6056fbec54fdc505611483.png