public void Mapping_With_AutoMapper_Profiles() { var configuration = new MapperConfiguration(cfg => { cfg.AddProfile <MaxWHConfirmProfile>(); }); var mapper = configuration.CreateMapper(); MaxWHConfirmViewModel vm = new MaxWHConfirmViewModel { Id = 1 }; MaxWHConfirm model = mapper.Map <MaxWHConfirm>(vm); Assert.Equal(vm.Id, model.Id); }
public Task <int> UpdateAsync(int id, MaxWHConfirm model) { throw new NotImplementedException(); }
public async Task <int> CreateAsync(MaxWHConfirm model) { MaxWHConfirmLogic.Create(model); return(await DbContext.SaveChangesAsync()); }