Moving Entity Framework model into class library from web project

前端 未结 2 786
梦谈多话
梦谈多话 2020-12-09 04:19

I am using Entity Framework and recently came to realize the benefits of having your EF model in another project within the same solution so that I can build multiple UIs fr

2条回答
  •  囚心锁ツ
    2020-12-09 04:42

    The UI project requiring a connection string is ridiculous. Only the class library that contains the Entity Framework specifics should require either a connection string to the database or even a reference to Entity Framework. This is leaking abstractions into your UI project, which should not even know what a database is.

提交回复
热议问题