public void Should_Success_GarmentShippingStaffProfile() { var mapper = new MapperConfiguration(configuration => configuration.AddProfile <GarmentShippingStaffProfile>()).CreateMapper(); var model = new GarmentShippingStaffModel(); var vm = mapper.Map <GarmentShippingStaffViewModel>(model); Assert.NotNull(vm); }
public async Task <int> CreateAsync(GarmentShippingStaffModel 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 GarmentShippingStaffModel GetNewData() { Guid guid = Guid.NewGuid(); GarmentShippingStaffModel model = new GarmentShippingStaffModel { Name = $"Name{guid}", }; return(model); }
public async Task <int> UpdateAsync(int id, GarmentShippingStaffModel model) { model.FlagForUpdate(_IdentityService.Username, _UserAgent); _DbSet.Update(model); return(await _DbContext.SaveChangesAsync()); }