Пример #1
0
 public virtual void RemoveCustomerInfo(UsersCustomer customerInfo)
 {
     if (UsersCustomers.Contains <UsersCustomer>(customerInfo))
     {
         var foundInfo = UsersCustomers.Single(ci => ci == customerInfo);
         UsersCustomers.Remove(foundInfo);
     }
 }
Пример #2
0
 public virtual void AddCustomerInfo(UsersCustomer customerInfo)
 {
     //Update existing info item
     if (this.UsersCustomers.Contains <UsersCustomer>(customerInfo))
     {
         var foundInfo = UsersCustomers.Single(ci => ci.Equals(customerInfo));
         foundInfo.Price = customerInfo.Price;
     }
     else
     {
         UsersCustomers.Add(customerInfo);
     }
 }