lundi 13 mars 2017

Dapper Design at DAL Layer

I am developing a new Application. I am restricted to using Stored Procs for retrieval and creating/updating records. I have been looking into Dapper for a Micro ORM.

Having been doing some reading it appears most people either go with UnitOfWork Repository pattern approach or else CQRS Pattern.

What are the main disadvantages/advantages of either approach.

I want to have Project structure something like below:

DAL
Service
WebAPI

So in my WebAPI controller I might have a CreateMethod which called my service layer.

var user = _myService.AddUser(user);

What would be the best approach then at the Service and DAL Layer with Dapper using stored procedures to have the most reusable code - i.e. - ideally would like one interface at the DAL Layer for managing the db connection

Aucun commentaire:

Enregistrer un commentaire