We are using Data Mapper + Domain Model + Service Layer + Repository + UOW from MF Patterns of EAA in the modern OCH based Applications and Frameworks.
Julie Lermen has identified 5 Pattern to encapsulate the Data Access Code. All these Patterns are based on Repository and UOW.
All these five Pattern are Repository and UOW Based Solutions,
Custom Defined Table GateWay built on the top of EF Repository
class Customer{DBContext.Customer+Generic CRUD Methods for Customer}
Data Access Wrapper Class on the DBContext.Customer
“One Table Repository” based Data Access Class defined by User
2. Entity-Specific Custom-CRUD Repository & UOW: Specialized Entity Repository Limited or Controlled Version of 1| Return 1 or more Domain Obj of same type | One Table involve in Read | CUD Methods Update One Domain Obj | Underlying Domain Class has Primitive Data Types | Domain Class can has Full or No Logic |CRUD Oriented Methods| Repository Data Class | DBContext is Wrapped Inside class | DBContext is UOW | Encapsulated Repository | It provides limited CRUD logic against Domain Object provided by EF it is positive as we control the how clients use the Data Access Code| Custom Repository based Data Access Class | Query or Save in 1Table | Called in Application Service by Generic Interface | Deals with One Table Row CUD Operations | Read may return IEnumerables of Domain Objects | Domain Objs having Primitive Data Types Only | User Defined Class. | User defined class around the DBContext and DBSet. |DBContext is the UOW that is used in combination with it. | In order to use this Class as pluing in Application Service, define Interface in App. Service Layer and this class implements this interface. | This class is defined in the Data Project | No Transactions
Julie Lermen has identified 5 Pattern to encapsulate the Data Access Code. All these Patterns are based on Repository and UOW.
All these five Pattern are Repository and UOW Based Solutions,
Custom Defined Table GateWay built on the top of EF Repository
class Customer{DBContext.Customer+Generic CRUD Methods for Customer}
Data Access Wrapper Class on the DBContext.Customer
“One Table Repository” based Data Access Class defined by User
2. Entity-Specific Custom-CRUD Repository & UOW: Specialized Entity Repository Limited or Controlled Version of 1| Return 1 or more Domain Obj of same type | One Table involve in Read | CUD Methods Update One Domain Obj | Underlying Domain Class has Primitive Data Types | Domain Class can has Full or No Logic |CRUD Oriented Methods| Repository Data Class | DBContext is Wrapped Inside class | DBContext is UOW | Encapsulated Repository | It provides limited CRUD logic against Domain Object provided by EF it is positive as we control the how clients use the Data Access Code| Custom Repository based Data Access Class | Query or Save in 1Table | Called in Application Service by Generic Interface | Deals with One Table Row CUD Operations | Read may return IEnumerables of Domain Objects | Domain Objs having Primitive Data Types Only | User Defined Class. | User defined class around the DBContext and DBSet. |DBContext is the UOW that is used in combination with it. | In order to use this Class as pluing in Application Service, define Interface in App. Service Layer and this class implements this interface. | This class is defined in the Data Project | No Transactions
No comments:
Post a Comment