public ActionResult <DeleteBrandResponse> DeleteBrand(long id) { DeleteBandRequest deleteBandRequest = new DeleteBandRequest(); deleteBandRequest.Id = id; return(brandService.DeleteBrand(deleteBandRequest)); }
public DeleteBrandResponse DeleteBrand(DeleteBandRequest deleteBandRequest) { var brand = brandRepository.FindBrandById(deleteBandRequest.Id); brandRepository.Delete(brand); var deletebrandresponse = new DeleteBrandResponse { Brand = messageMapper.MapToBrandDto(brand) }; return(deletebrandresponse); }