public bool SaveCustomerPrice(CustomerPriceDto customerPriceDetails)
        {
            this.customerprice = customerPriceDetails.DtoToEntity();

            if (this._customerprice.Insert(this.customerprice).IsNull())
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        public static IOBalanceEntity.CustomerPrice DtoToEntity(this CustomerPriceDto dto)
        {
            IOBalanceEntity.CustomerPrice entity = null;

            if (!dto.IsNull())
            {
                entity = new IOBalanceEntity.CustomerPrice
                {
                    CustomerID = dto.CustomerId,
                    Price      = dto.Price,
                    ProductID  = dto.ProductId
                };
            }

            return(entity);
        }
 public CustomerPriceService(IIOBalanceRepository <CustomerPrice> customerprice)
 {
     this._customerprice = customerprice;
     this.customerprice  = new IOBalanceEntity.CustomerPrice();
 }