Entity Framework Database First - Relationships

♀尐吖头ヾ 提交于 2019-12-23 04:24:57

问题


I think I have CodeFirst understood. Now I know database first EF design is targeted for existing databases, but if I were to quickly go in and create a new database in management studio and create some tables, is it normal that you would create relationships for the tables in management studio or in the edmx designer, I tried in the edmx but got errors when I went to debug. What is the best practice here and what are the correct steps to create Associations between tables if I were to do it in the designer and how does the database in management studio know to update? Any tips/advice is appreciated.


回答1:


In times that the entity is updated, try to Run Custom Tool your model to avoid errors. just Right Click your model and Run Custom Tool.



来源:https://stackoverflow.com/questions/14532090/entity-framework-database-first-relationships

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!