示例#1
0
        private async Task Create(CreateOrEditProductSubCategoryDto input)
        {
            var productSubCategory = ObjectMapper.Map <ProductSubCategory>(input);



            await _productSubCategoryRepository.InsertAsync(productSubCategory);
        }
示例#2
0
 public async Task CreateOrEdit(CreateOrEditProductSubCategoryDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
示例#3
0
        private async Task Update(CreateOrEditProductSubCategoryDto input)
        {
            var productSubCategory = await _productSubCategoryRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, productSubCategory);
        }