ASP.NET and Entity Framework in Layered Architecture - using Entity Framework for ORM only

后端 未结 6 1499
庸人自扰
庸人自扰 2021-01-30 05:19

I have an ASP.NET application that uses a layered architecture e.g. presentation layer, business logic layer, data access layer.

I don\'t want to the business layer to h

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-30 06:19

    1. If you are practical: Yes! It will avoid you double mapping work and the potential errors generated by the double mapping. (By double mapping I mean DB -> ORM and ORM -> Business logic).
    2. Use TransactionScope. It's the best way to do transaction without worrying about nested transactions.

提交回复
热议问题