Tag Info

New answers tagged

2

As an amendment to the above answer (and a bit of a history lesson), "3-tier" and "n-tier" are the same where n=3. Back in the dark ages, application code and data were all in the same assembly (and "computing machines" were the size of rooms). That quickly changed, and "data files" were invented, creating a two-layered (still single-tiered) architecture. ...


-3

You can use tags like section or article to group your controls based on their functionality. On the other hand, you can use an HTML Editor like jsFiddle to make the structure and then, copy to ASP.Net MVC.


1

In MVC, the model (that is an instance of a model class) is nothing more than an ordinary object. It is initialized by the controller which passes it to MVC's engine which, in turn, uses it when generating the final result from a view. If you're asking whether it is stored on the stack or on the heap, the response is: on the heap. Instance variables for ...


2

Your confusion is understandable. Different MVC frameworks have different approaches when it comes to models: some encourage lightweight models, while others welcome models which contain a lot of information. In ASP.NET MVC, the common practice I observe in many projects is the following: Business logic: Models don't contain business logic. In other ...


4

In general, you don't need to use Using statements with Entity Framework data contexts. Lazy collections is one of the reasons why. So your code would simply be: <HttpGet> Public Function Schedule(ByVal id As Int64) As ActionResult Dim model As Schedule = Nothing Dim database As dataContext = New dataContext model = (From s In ...


1

I would separate only the server side code and leave all the client side components in one common project. I'm not bothered by your assertion that users would have to work on multiple projects; every Visual Studio solution I've ever worked on has multiple projects, and some have many. The only time you would create Nuget packages would be if you are using ...


0

We have had problems with duplicate but different Entity Framework DbContext instances when a IoC container that new() up repositories per type (for example a UserRepository and a GroupRepository instance that each call their own IDbSet from DBContext), can sometimes cause multiple contexts per request (in an MVC/web context). Most of the time it still ...


1

JSON.NET has a nice approach for this. It provides different ways to deal with this issue. See Serializing and Deserializing JSON. There are method resulting in a type called JObject which has methods allowing you to traverse the resulting model.



Top 50 recent answers are included