コード例 #1
0
 public async Task <int> CreateAsync(BadOutputModel model)
 {
     do
     {
         model.Code = CodeGenerator.Generate();
     }while (DbSet.Any(d => d.Code.Equals(model.Code)));
     this.BadOutputLogic.CreateModel(model);
     return(await DbContext.SaveChangesAsync());
 }
コード例 #2
0
        public async Task <int> UpdateAsync(int id, BadOutputModel model)
        {
            await BadOutputLogic.UpdateModelAsync(id, model);

            return(await DbContext.SaveChangesAsync());
        }