0
votes

This may seem like a silly question, but I thought I'd ask it anyway :)

When you use Entity Framework's Database First approach you can create an Entity Data Model to describe the structure of your business objects.

You can also use the ADO.Net DbContext Generator to create persistance ignorance POCO classes. However, when you make a change to the Data Model, ie add a new property to an existing Entity, in order for the corresponding POCO class to also reflect this change, do you have to:

  1. Manually add the new property to the POCO class
  2. Recreate all the POCOs again using the DbContext Generator

I guess what I am asking is there anyway the POCO can be automatically updated if a change is made to the Model?

Thanks everyone.

1

1 Answers

1
votes

If you're using the T4 Templates that look at the edmx file, you can just regenerate the pocos by running the templates: Click the Transform Templates icon in the Solution Explorer? )or have I missed something)