예제 #1
0
        public async Task Post()
        {
            GarmentSectionViewModel VM = GenerateTestModel();
            var response = await this.Client.PostAsync(URI, new StringContent(JsonConvert.SerializeObject(VM).ToString(), Encoding.UTF8, "application/json"));

            Assert.Equal(HttpStatusCode.Created, response.StatusCode);
        }
        public GarmentSectionViewModel MapToViewModel(GarmentSection model)
        {
            GarmentSectionViewModel viewModel = new GarmentSectionViewModel();

            PropertyCopier <GarmentSection, GarmentSectionViewModel> .Copy(model, viewModel);

            return(viewModel);
        }
        public GarmentSection MapToModel(GarmentSectionViewModel viewModel)
        {
            GarmentSection model = new GarmentSection();

            PropertyCopier <GarmentSectionViewModel, GarmentSection> .Copy(viewModel, model);

            return(model);
        }