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()); }
public async Task <int> UpdateAsync(int id, BadOutputModel model) { await BadOutputLogic.UpdateModelAsync(id, model); return(await DbContext.SaveChangesAsync()); }