adamfoneil / Dapper.CX

A Crud library based on Dapper
MIT License
8 stars 1 forks source link

ability to create a SqlServerCmd from model #10

Closed adamfoneil closed 4 years ago

adamfoneil commented 4 years ago

Would like to be able to write this code

await new SqlServerCmd("dbo.Mp3File", "Id")
{
    { nameof(Mp3File.IsDeleted), isDeleted }
}.UpdateAsync(connection, fileId);

like this

await new SqlServerCmd<Mp3File>()
{
    { model => model.IsDeleted, isDeleted }
}.UpdateAsync(connection, fileId);
adamfoneil commented 4 years ago

started on this here 0d70a8e92201ef7362adb1bbde17e1fad50e0046 but not sure this is better than current UpdateAsync method that accepts lambda args