public async Task <IActionResult> Post([FromBody] BrandCreateModel brandCreateModel) { if (await _brandService.BrandExist(brandCreateModel.Title)) { return(Conflict("Such brand already exists")); } BrandDto brandDto = _mapper.Map <BrandDto>(brandCreateModel); BrandDto createdBrandDto = await _brandService.CreateBrand(brandDto); BrandWebModel brandModel = _mapper.Map <BrandWebModel>(createdBrandDto); return(CreatedAtAction(nameof(Get), new { id = brandModel.BrandId }, brandModel)); }