Last post Feb 23, 2015 04:57 PM by itpreneur
Jul 17, 2013 01:36 PM|mailbankey|LINK
As I am new in entityFramework world. In a application I am using EntityFramework to implement ORM. But I am following Domain-Centric Modeling Approach. I have created some object in my application and by EF corresponding table got created in database. Everything
But Now there is a requirement, a Job already creating a table into our database. this table data I need to use in my application. So I have created a class corresponding to this table in my application but i am getting a exception as follows:
Please suggest me on the same that, how can I ignore the table creation which is already created in database?
Feb 23, 2015 04:57 PM|itpreneur|LINK
Apparently, whether you use Code First/Database First, you don't have any choice of ignoring syncing between your database and code. One way or the other, one has to be sync either from your database first or from your code first. These are typical dilemmas
and you have to be familiar with EF Command lines, Enable-migrations, add-migrations, update-database, DBcontext->onmodelcreating, dbmigrations, entitytypeconfiguration. These will be now your based keywords which will help you through.
If you don't understand this crux, you'll be having hard time supporting/developing EF applications. EF is pain in the ass if you're working in collaborative environment where different developers made changes both via database script or code. It's like a chicken
and egg problems and has to have some kinda of rules set first.
Hope this helps.