コード例 #1
0
        public void Should_Success_GarmentLeftoverWarehouseBuyerProfile()
        {
            var mapper = new MapperConfiguration(configuration => configuration.AddProfile <GarmentLeftoverWarehouseBuyerProfile>()).CreateMapper();
            var model  = new GarmentLeftoverWarehouseBuyerModel();
            var vm     = mapper.Map <GarmentLeftoverWarehouseBuyerViewModel>(model);

            Assert.NotNull(vm);
        }
コード例 #2
0
        public async Task <int> CreateAsync(GarmentLeftoverWarehouseBuyerModel 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());
        }
コード例 #3
0
        public GarmentLeftoverWarehouseBuyerModel GetNewData()
        {
            Guid guid = Guid.NewGuid();

            GarmentLeftoverWarehouseBuyerModel model = new GarmentLeftoverWarehouseBuyerModel
            {
                Code    = $"Code{guid}",
                Name    = $"Name{guid}",
                Address = $"Address{guid}",
                NPWP    = $"NPWP{guid}",
                WPName  = $"WPName{guid}",
            };

            return(model);
        }
        public GarmentLeftoverWarehouseBuyerModel GetNewData()
        {
            Guid guid = Guid.NewGuid();

            GarmentLeftoverWarehouseBuyerModel model = new GarmentLeftoverWarehouseBuyerModel
            {
                Code        = $"Code{guid}",
                Name        = $"Name{guid}",
                Address     = $"Address{guid}",
                PhoneNumber = $"PhoneNumber{guid}",
                NIK         = $"NIK{guid}",
                NPWP        = $"NPWP{guid}",
                WPName      = $"WPName{guid}",
                KaberType   = $"KaberType{guid}",
            };

            return(model);
        }
コード例 #5
0
 public async Task <int> UpdateAsync(int id, GarmentLeftoverWarehouseBuyerModel model)
 {
     model.FlagForUpdate(_IdentityService.Username, _UserAgent);
     _DbSet.Update(model);
     return(await _DbContext.SaveChangesAsync());
 }