Ejemplo n.º 1
0
 public async Task <int> CreateAsync(DurationEstimationModel model)
 {
     do
     {
         model.Code = CodeGenerator.Generate();
     }while (DbSet.Any(d => d.Code.Equals(model.Code)));
     DurationEstimationLogic.CreateModel(model);
     return(await DbContext.SaveChangesAsync());
 }
Ejemplo n.º 2
0
        public async Task <int> UpdateAsync(int id, DurationEstimationModel model)
        {
            await DurationEstimationLogic.UpdateModelAsync(id, model);

            return(await DbContext.SaveChangesAsync());
        }