public ActionResult <DeleteBrandResponse> DeleteBrand(long id)
        {
            DeleteBandRequest deleteBandRequest = new DeleteBandRequest();

            deleteBandRequest.Id = id;
            return(brandService.DeleteBrand(deleteBandRequest));
        }
示例#2
0
        public DeleteBrandResponse DeleteBrand(DeleteBandRequest deleteBandRequest)
        {
            var brand = brandRepository.FindBrandById(deleteBandRequest.Id);

            brandRepository.Delete(brand);
            var deletebrandresponse = new DeleteBrandResponse {
                Brand = messageMapper.MapToBrandDto(brand)
            };

            return(deletebrandresponse);
        }