public Task <int> CreateAsync(DailyMonitoringEventModel model) { do { model.Code = CodeGenerator.Generate(); }while (DbSet.Any(d => d.Code.Equals(model.Code))); DailyMonitoringEventLogic.CreateModel(model); return(DbContext.SaveChangesAsync()); }
public async Task <int> UpdateAsync(int id, DailyMonitoringEventModel model) { await DailyMonitoringEventLogic.UpdateModelAsync(id, model); return(await DbContext.SaveChangesAsync()); }