In what files are the Data Model and Schema declared in ASP.NET Core projects?

白昼怎懂夜的黑 提交于 2019-12-12 07:03:14

问题


Going by this answer, I know that an ASP.NET Core project must have a data model and a database schema, if it has a database.

For months, I thought the data model resided in a Context class that inherited from DbContext. But I've come cross a tutorial that says this class is where the Schema lives.

Where does the Data Model and Schema get declared for ASP.NET Core projects?


回答1:


It uses EF Core (an O/RM). It uses metadata mapping to define that database schema based on the domain model.



来源:https://stackoverflow.com/questions/50142503/in-what-files-are-the-data-model-and-schema-declared-in-asp-net-core-projects

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