Пример #1
0
        internal static CustomerProductCode ConstrainByKeys(this CustomerProductCode productCode, ICustomerKey customerKey, IChileProductKey chileProductKey = null)
        {
            if (productCode == null)
            {
                throw new ArgumentNullException("productCode");
            }

            if (customerKey != null)
            {
                productCode.Customer   = null;
                productCode.CustomerId = customerKey.CustomerKey_Id;
            }

            if (chileProductKey != null)
            {
                productCode.ChileProduct   = null;
                productCode.ChileProductId = chileProductKey.ChileProductKey_ProductId;
            }

            return(productCode);
        }
Пример #2
0
 public void Remove(CustomerProductCode customerProductCode)
 {
     _context.CustomerProductCode.Remove(customerProductCode);
 }
Пример #3
0
 public void Add(CustomerProductCode customerProductCode)
 {
     _context.CustomerProductCode.Add(customerProductCode);
 }