Reputation: 341
Is it good practice to delete properties (columns) that are not required from entity framework 6 model that is auto generated using database first approach? If not then what is the alternative.
Please explain.
Upvotes: 0
Views: 54
Reputation: 1633
It is not a a good idea. The model generated is a representation of your database. Rather re-design your database tables to include only the columns you want. If you delete the properties from the code-generated model the schema will be wrong and you will run into problems.
If you do not want to delete the database columns, then you can use code first and map your model to the existing database columns.
Upvotes: 1