public async Task <int> CreateAsync(GarmentAdditionalChargesModel model) { model.FlagForCreate(_IdentityService.Username, _UserAgent); model._LastModifiedAgent = model._CreatedAgent; model._LastModifiedBy = model._CreatedBy; model._LastModifiedUtc = model._CreatedUtc; _DbSet.Add(model); return(await _DbContext.SaveChangesAsync()); }
public GarmentAdditionalChargesModel GetNewData() { Guid guid = Guid.NewGuid(); GarmentAdditionalChargesModel model = new GarmentAdditionalChargesModel { Name = $"Name{guid}", }; return(model); }
public async Task <int> UpdateAsync(int id, GarmentAdditionalChargesModel model) { model.FlagForUpdate(_IdentityService.Username, _UserAgent); _DbSet.Update(model); return(await _DbContext.SaveChangesAsync()); }