I am a relative newcomer for C#.Net (.net 4), EF4, Winforms, and MVC3.
I had laid out a database in SQL Server in the process of developing a Winforms "backend" for a task I have been assigned. I setup a single Solution and created a .edmx from the database as its own project/assembly in the solution. Also in the solution is the winforms app that references the .edmx assembly. Using the default EF4 code generation, I built out the Winforms app and all is well there.
Now, I have to build out the enduser web frontend. I want to use MVC3. I have been through MVC3 tutorials on Pluralsight and fairly a decent understanding of MVC3 from that. But, both therein and elsewhere, most examples of MVC3+EF4 are "code first".
My confusion is what is the best approach to combine an EF4 Database-first with MVC3? I have looked some at EF4Templates, but, it seems these generate POCOs that are different than the default EF4 stuff and would break my Winforms app. I have read some on Repositories and the use of Automapper as well. I can add a reference to EF4 and my .edmx into the MVC3 project (same as I did with the Winforms), but it appears one still has to contruct a controller/view's model OR can one just work directly with the default EF4 classes in a controller?
Just seeking some guidance as to just how this has to be approached with respect to MVC3.
Thanks!