Example #1
0
 public static Task <PKMember> UpdateMember(this IPKConnection conn, MemberId id, MemberPatch patch)
 {
     var(query, pms) = patch.Apply(UpdateQueryBuilder.Update("members", "id = @id"))
                       .WithConstant("id", id)
                       .Build("returning *");
     return(conn.QueryFirstAsync <PKMember>(query, pms));
 }
Example #2
0
 public Task <PKMember> UpdateMember(IPKConnection conn, MemberId id, MemberPatch patch, IDbTransaction?transaction = null)
 {
     _logger.Information("Updated {MemberId}: {@MemberPatch}", id, patch);
     var(query, pms) = patch.Apply(UpdateQueryBuilder.Update("members", "id = @id"))
                       .WithConstant("id", id)
                       .Build("returning *");
     return(conn.QueryFirstAsync <PKMember>(query, pms, transaction));
 }