public Task <int> CreateAsync(ColorReceiptModel model) { var totalData = DbSet.Count(); string code = string.Format("{0} {1}{2}", model.ColorName, model.TechnicianName, totalData + 1); model.ColorCode = code; ColorReceiptLogic.CreateModel(model); return(DbContext.SaveChangesAsync()); }
public async Task <int> UpdateAsync(int id, ColorReceiptModel model) { await ColorReceiptLogic.UpdateModelAsync(id, model); return(await DbContext.SaveChangesAsync()); }