Visual Studio TFS Project, my models get deleted after update from database

I am working on visual studio 2012, a team project on TFS. after my team members updated the database, i tried to get the latest updates on the models, i update my models from the database, my models are deleted, i tried to update tables from the database and get the latest from the original control, but my model deleted i need your experience thanks

+3


source to share


1 answer


Are you sure you are using the same permissions as other developers? Remember, if your developer account does not have permission to a particular table in Oracle, then it will not be visible when using Update Model from Database and therefore deleted.



Also, if you have the correct permissions, then when you select Update Model from Database, if the entity / table has already been imported into your data model, you will update the object. This process will not automatically map your database schema to an existing data model, however you can add a property to an object in your EF model and then map the property to a database column (this is exactly what EF does automatically for you when you delete and update normally). When you drop the object first, then the EF update knows that the table / object has not been previously imported and therefore will automatically map all database columns for you.

0


source







All Articles