public IActionResult UpdateBrand(int id, [FromBody] BrandAggregate brandDto) { var brand = new Brand(brandDto.Name, brandDto.CountryCode); _brandRepository.Update(id, brand); return(Ok($"Brand with ID: {brand.Id} successfully updated")); }
public IActionResult CreateBrand([FromBody] BrandAggregate brandDto) { var brand = new Brand(brandDto.Name, brandDto.CountryCode); _brandRepository.Create(brand); return(Ok($"Brand {brand.Name} has ID: {brand.Id}")); }