Example #1
0
 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());
 }
Example #2
0
        public async Task <int> UpdateAsync(int id, DailyMonitoringEventModel model)
        {
            await DailyMonitoringEventLogic.UpdateModelAsync(id, model);

            return(await DbContext.SaveChangesAsync());
        }