Call custom constructor with Dapper?

前端 未结 2 590
失恋的感觉
失恋的感觉 2020-12-29 06:26

I\'m trying to use Dapper to interface with the ASP.NET SQL Membership Provider tables. I wrapped the SqlMembershipProvider class and added an additional method to get me t

2条回答
  •  醉梦人生
    2020-12-29 06:43

    I use this maybe it's help someone

    YourList = connection.Query(Query, arg)
                  .Select(f => new ClassWithConstructor(f.foo,f.bar))
                  .ToList();  
    

提交回复
热议问题