Exemple #1
0
        public async Task UpdateCategoryAsync(CategoryUpdateInputDtoModel categoryDto)
        {
            var catetory = CategoryUpdateMapper.Map(categoryDto);

            this.categories.Update(catetory);
            await this.categories.SaveChangesAsync();
        }
Exemple #2
0
        public static CategoryUpdateInputDtoModel Map(CategoryUpdateInputModel category)
        {
            var categoryDto = new CategoryUpdateInputDtoModel
            {
                Id           = category.Id,
                Name         = category.Name,
                ImageAddress = category.ImageAddress,
            };

            return(categoryDto);
        }