MVC3 and Entity Framework

前端 未结 3 1525
不知归路
不知归路 2020-11-22 11:30

My question is pretty simple: is it a good practice to place the .edmx file in the model folder in a Web application of an MVC3 project?

3条回答
  •  清歌不尽
    2020-11-22 11:45

    I don't think this matters much.

    I use CodeFirst, so my DbContext class goes to the Model folder.

    Really, the EDMX is there just for the code generation, beyond that it does not do much, its not deployed/published to your server, etc. So where it stays isn't important. You could create another folder for it EDMX if you want, or put it in Model as you asked.

提交回复
热议问题