Skip to content

Dapper.Mapper is an extension to Dapper multi mapping which figures out the relationships between the returned objects and automatically assigns them.

License

Notifications You must be signed in to change notification settings

heniu75/Dapper.Mapper

 
 

Repository files navigation

Dapper.Mapper

Easier Multi Mapping

Dapper allows you to map a single row to multiple objects. Dapper.Mapper figures out the relations between the different returned objects and automatically assigns them.

Example:

var sql = @"select * from Employee 
inner join Department on Department.Id = Employee.DepartmentId";

Instead of explicitly writing this:

var employee = connection.Query<Employee, Department, Employee>(sql, (employee, department) => { employee.Department = department; return employee;});

Dapper.Mapper allows you to write this:

var employee = connection.Query<Employee, Department>(sql);

About

Dapper.Mapper is an extension to Dapper multi mapping which figures out the relationships between the returned objects and automatically assigns them.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%