MarimerLLC / cslaforum

Discussion forum for CSLA .NET
https://cslanet.com
Other
31 stars 6 forks source link

Dapper and Csla Helper Classes #946

Open Chicagoan2016 opened 4 years ago

Chicagoan2016 commented 4 years ago

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.

danielmartind commented 4 years ago

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.

Batzangia commented 4 years ago

Dapper is so cool micro ORM.

angtianqiang commented 4 years ago

I use petapoco