public async Task UpdateCategoryAsync(CategoryUpdateInputDtoModel categoryDto) { var catetory = CategoryUpdateMapper.Map(categoryDto); this.categories.Update(catetory); await this.categories.SaveChangesAsync(); }
public static CategoryUpdateInputDtoModel Map(CategoryUpdateInputModel category) { var categoryDto = new CategoryUpdateInputDtoModel { Id = category.Id, Name = category.Name, ImageAddress = category.ImageAddress, }; return(categoryDto); }