public async Task SaveAsyncWithRetryTest() { using (var context = new DevTestContext()) { var order = new Order { OrderNo = SequenceNoUtils.GenerateNo('O'), OrderAmount = 10000, ProductNo = "PN1001", UserNo = "UID1001" }; await context.SaveAsync(order); } }
public void SaveOrUpdateWithRetryTest() { using (var context = new DevTestContext()) { var order = new Order { OrderNo = SequenceNoUtils.GenerateNo('O'), OrderAmount = 10000, ProductNo = "PN1001", UserNo = "UID1001" }; context.Save(order); context.SaveOrUpdate(order, x => x.Id == order.Id); } }