cslaforum icon indicating copy to clipboard operation
cslaforum copied to clipboard

Dapper and Csla Helper Classes

Open Chicagoan2016 opened this issue 5 years ago • 3 comments

Question We have always (almost) used ADO.NET and stored procs for Data Access, we are looking into Entity framework Core and Dapper and Dapper looks lightweight and it appears, would require very little learning curve. I know we have some great classes provided by Csla such as ConnectionManager and SafeReader (among others), we would hate to lose functionality provided out of the box by Csla. Could we use those classes with Dapper? or are they redundant?

Warm Regards

Version and Platform CSLA version: 4.7.100 OS: Windows, Linux, iOS, Android, etc. Platform: WinForms, WPF, ASP.NET Core, MVC, Xamarin, etc.

Chicagoan2016 avatar May 06 '20 08:05 Chicagoan2016

I have used the ConnectionManager with Dapper in the past, I think it is mainly extension methods on the db connection. I have read that Rocky is recommending to just use DI and inject the connection in place of ConnectionManager these days though.

SafeReader would be largely redundent as results are generally strongly typed and I have just mapped them to DTO's in a similar way that EF is used in project tracker.

danielmartind avatar May 06 '20 12:05 danielmartind

Dapper is so cool micro ORM.

Batzangia avatar May 06 '20 15:05 Batzangia

I use petapoco

angtianqiang avatar May 07 '20 00:05 angtianqiang