I’ve been looking at a couple of the MVC tutorials on the ASP.NET website and and have noticed numerous of them make use of Entity Framework (especially the Identity provider stuff).
Maybe my experience is a bit too “old-school”, but I believe a website should never directly talk to a database (even if you wrap it in repositories or inject “services”).
At work we generally design our software using an N-Tier approach for anything that requires a little bit of load:
Web -> WCF (over net.tcp) -> Database (using Dapper mostly and some Entity Framework)
Looking at the Identity Provider that comes out of the box, there seems to be numerous calls that will hit the database directly for every page load. It just seems to me that you’re gaining a bit on the initial development but would require a much higher investment (time & hardware) later.
How can a website run under load using MVC and EF in this way?
1