public class CustomerDataException : Exception
{
public CustomerDataException(string message) : base(message) { }
public CustomerDataException(string message, Exception exception)
: base(message, exception) { }
}
Product a = new Product
{
Id = item.Id,
Category=item.Category,
Description=item.Description,
Label=item.Label,
Price=item.Price,
Thumbnail=item.Thumbnail,
};
var product = await _unitOfWork.ProductRepository.AddAsync(a);
return _mapper.Map<ProductDto>(product);
Product productAdd = new Product();
_mapper.Map<ProductDto>(productAdd);
Product product = await _unitOfWork.ProductRepository.AddAsync(productAdd);
return _mapper.Map<ProductDto>(product);