Пример #1
0
 public virtual void RemoveCustomerInfo(UserCustomerInfo customerInfo)
 {
     if (CustomerInfo.Contains <UserCustomerInfo>(customerInfo))
     {
         var foundInfo = CustomerInfo.Single(ci => ci == customerInfo);
         CustomerInfo.Remove(foundInfo);
     }
 }
Пример #2
0
 public virtual void AddCustomerInfo(UserCustomerInfo customerInfo)
 {
     //Update existing info item
     if (CustomerInfo.Contains <UserCustomerInfo>(customerInfo))
     {
         var foundInfo = CustomerInfo.Single(ci => ci.Equals(customerInfo));
         foundInfo.PricePrHour = customerInfo.PricePrHour;
     }
     else
     {
         CustomerInfo.Add(customerInfo);
     }
 }
Пример #3
0
 public virtual bool CustomerInfoExists(UserCustomerInfo customerInfo)
 {
     return(CustomerInfo.SingleOrDefault(c => c.Equals(customerInfo)) != null);
 }