entity framework 4.1 - ASP.Net MVC 3 with EF 4.1: Is it possible to switch from database first to code first -


Net MVC 3 web application. I have created my model using the existing database but now, I like to use the "pattern" Is this possible? How do I tell my solution that I want to make it a table for the new model code?

Yes, but your database may not exist

  1. Add your reference class, which declares your DBCnet customer as DBCtext; Set;}
  2. Add your connect string to your SDF file.

    Note the important part about building your database: "This is by default if your connection - string indicates a SQL CE or SQL Express database file that was previously on disk You do not have to take any action manually to do this. "

    So the path to add to the existing database - this is not going to happen.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -