Subject: Help & Support Case for ADO.NET Entity Framework back end changes & front end changes with sync to Model & Database respectively.

Abhay Sakunde 0 Reputation points
2023-04-24T07:46:32.72+00:00

Help & Support Case From, Abhay Sakunde, Cognizant India Pvt. Ltd. Pune Project Team: MWS CWS Apps Team

To, The Manager, Human Resources Or Development Team, Microsoft India Pvt. Ltd. Pune Subject: Help & Support Case for ADO.NET Entity Framework back end changes & front end changes with sync to Model & Database respectively. Hi Team, Initially using Entity Workflows: Program / Model / Database Priority, we do the design of ADO.NET Entity Data Model & development of database. But once initial process is done if any changes occur either as back end changes into database or front end changes into model then how we can manage or do synchronization between ADO.NET Entity Data Model & Database? How it is done with respect to different type of Entity Workflows i.e. Program / Model / Database Priority? There are following options like

  1. Update Model From Database
  2. Generate Database From Model In case of Entity Workflows - Model Priority, Initially Model is designed & database is generated. Now if model is changed only then option Generate Database From Model will work either to update existing database or new Database will get created? Please Clarify. In case of Entity Workflows - Database Priority, Initially database exists & model design is generated. Now, if model is changed only then option Generate Database From Model will work either to update existing database or new Database will get created? Please Clarify. Waiting for reply. Please let me know if any detail information required for mentioned feature. Screens: [1] Model & Database Options

Thanks & Regards, Abhay Sakunde Model & Database Options.png

Developer technologies | .NET | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jack J Jun 25,296 Reputation points
    2023-04-25T07:21:06.5+00:00

    @Abhay Sakunde, Welcome to Microsoft Q&A,

    If you change the database and want to update it in model, you could refer to the following answer to update your model from database:

    Entity Framework : How do you refresh the model when the db changes? If you change the model and want to update it in model, you need to use the option Generate the DataBase. However, I find it will not update the database table and create a new table.

    Taking a long-term view of the program, I recommend that you use EF Core to replace ef to update model from database or update database from model.

    You could look at the following Microsoft Learning to use ef core.

    Code First->https://learn.microsoft.com/en-us/ef/core/get-started/overview/first-app?tabs=netcore-cli

    DataBase First->https://learn.microsoft.com/en-us/ef/core/managing-schemas/scaffolding/?tabs=dotnet-core-cli

    Hope my explanation could help you.

    Best Regards,

    Jack

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.