How much does the actual memory / performance increase in an ASP.NET MVC controller cost when using these two different ways to declare a model for presentation?
User user = userService.GetByID(id);
return View(user);
or
return View(userService.GetById(id));
I assume that the last one is more efficient since we are not initializing the object, however the first one is more readable. Will it make a difference on a web server with thousands of visitors?
source
share