public async Task <Brand> AddOrUpdate(Brand brand) { var brandDbo = new BrandDbo();//await _brandRepository.Get(brand.Id); brandDbo = _mapper.Map(brand, brandDbo); return(_mapper.Map <Brand>(await _brandRepository.AddOrUpdate(brandDbo))); }
public async Task <Brand> AddOrUpdate(Brand brand) { var brandDbo = new BrandDbo();//await _brandRepository.Get(brand.Id); brandDbo = _mapper.Map(brand, brandDbo); return(_mapper.Map <Brand>(await _brandRepository.AddOrUpdate(brandDbo))); }