If Entity Framework / DbContext is the DAL / Repository, where does it fit within 3-tier architecture?

后端 未结 2 492
予麋鹿
予麋鹿 2021-02-10 00:52

I\'ve been reading articles on StackOverflow and other sites all day about best architecture practices and there are just so many conflicting ideas and opinions.

I\'ve

2条回答
  •  死守一世寂寞
    2021-02-10 01:31

    There is no need for Domain Model since it will be redundancy. EF classes directly can act as Domain Model and they are converted to View Models while sending it to View. EF can be separated into different class library. Most of them use repository pattern along with any ORM incase it would be easy if they go for replacement. But I've seen criticism over using repository pattern, check this out.

提交回复
热议问题