ASP.NET MVC Entity Framework ObjectContext?

First, your web application should be stateless, whenever possible. You don't want to code into your application a dependency that the web server which served the page to the user must be the web server which handles the actual update. You may not intend to deploy to a server farm right off the bat, but if you ever make that jump, you will not want to have to rewrite your application to do it.

That alone is a good reason to not try and store the object somewhere, and I haven't even mentioned the Entity Framework or MVC specifically As it turns out, though, an ObjectContext is, in fact, fairly lightweight. If you do your view generation at compile time (Google it), spending one up has very little overhead at all.

First, your web application should be stateless, whenever possible. You don't want to code into your application a dependency that the web server which served the page to the user must be the web server which handles the actual update. You may not intend to deploy to a server farm right off the bat, but if you ever make that jump, you will not want to have to rewrite your application to do it.

That alone is a good reason to not try and store the object somewhere, and I haven't even mentioned the Entity Framework or MVC specifically. As it turns out, though, an ObjectContext is, in fact, fairly lightweight. If you do your view generation at compile time (Google it), spending one up has very little overhead at all.

I've DbContext class from there I have an implementation of Generic Repositories and unit of work in a such way that leads to use ObjectContext. I followed this link in general. I've read lot of posts related to the ObjectContext vs DBContext which somewhat makes sense.

But I've no idea about my current implementation. Just wondering if its an anti-pattern or I'm playing safe?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions