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

            return(await DbContext.SaveChangesAsync());
        }