Dapper Tutorial Dapper Contrib - 데이터 주석 - 계산 됨
기술
속성이 업데이트에서 제외되어야한다고 지정하십시오.
[Table("Invoice")] public class InvoiceContrib { [Key] public int InvoiceID { get; set; } public string Code { get; set; } public InvoiceKind Kind { get; set; } [Write(false)] [Computed] public string FakeProperty { get; set; } } using (var connection = My.ConnectionFactory()) { connection.Open(); var invoices = connection.GetAll<InvoiceContrib>().ToList(); // The FakeProperty is skipped invoices.ForEach(x => x.FakeProperty += "z"); var isSuccess = connection.Update(invoices); }