Dapper-Extensions icon indicating copy to clipboard operation
Dapper-Extensions copied to clipboard

Add Support for Stored Procedures to Get and GetList with Mapping

Open sam-changtum opened this issue 8 years ago • 2 comments

Where I work I have to deal with legacy (predecessor) databases containing quite a few stored procedures which are mostly used for querying the database. All of the result sets from these procedures return column names that have to be mapped to C# property names per C# coding standards/conventions.

I see that we can always drop to Dapper/Dapper.Contrib when I need to execute a stored procedure, but... that requires I also use a different mapping strategy via the [ColumnAtrribute] which does work and is wonderful. The ClassMapper is really attractive due to it moves the job of mapping table/column names away from the POCO.

Would there be enough interest in this becoming an enhancement for the Get and GetList operations?

I only see one other related issue here #127 which was closed on Oct 19, 2016.

sam-changtum avatar Feb 22 '17 03:02 sam-changtum

I agree this would be appreciated

pcbHikeME avatar May 12 '17 19:05 pcbHikeME

As it can be seen in the related issue is possible to use and DapperExtensions will map the result object. There is an example in the issue that was given by timdooling.

How a class, that is the base object for querying the database would identify when to use a StoredProcedure or using a select?

I believe any enhancement is welcome. Please, feel free to create the new methods and send the PR.

valfrid-ly avatar May 10 '21 13:05 valfrid-ly