Click here to Skip to main content
15,901,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using codefirst entityframework4.1.In that am creating 2 classes in windows application.By using dbcontext am connecting my server database and create database in server side.
For that am using DropCreateDatabaseIfModelChanges<context> setting the database.If any changes in classes i can able to change it and same changes are applicable in database also.
But any data is inserted in database,am not doing any changes in classes.
Suppose am doing any changes and run the application data will be dropped and created the changed table.
IF i comment the DropCreateDatabaseIfModelChanges then also it generates an error like "modelchanges".
How can i do this,data is not dropped in database at the same time class changes,database also changes.

Can any one help me please,am very new to this.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900