/// <summary> /// Create a new Customer object. /// </summary> /// <param name="customerID">Initial value of the CustomerID property.</param> /// <param name="accountNumber">Initial value of the AccountNumber property.</param> /// <param name="customerType">Initial value of the CustomerType property.</param> /// <param name="rowguid">Initial value of the rowguid property.</param> /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param> public static Customer CreateCustomer(global::System.Int32 customerID, global::System.String accountNumber, global::System.String customerType, global::System.Guid rowguid, global::System.DateTime modifiedDate) { Customer customer = new Customer(); customer.CustomerID = customerID; customer.AccountNumber = accountNumber; customer.CustomerType = customerType; customer.rowguid = rowguid; customer.ModifiedDate = modifiedDate; return customer; }
private StoreContact FindStoreContactForContact(Contact contact, Customer customer) { IQueryable<StoreContact> query = from obj in NakedObjectsFramework.Persistor.Instances<StoreContact>() where obj.Contact.ContactID == contact.ContactID && obj.Store.CustomerId == customer.CustomerId select obj; return query.FirstOrDefault(); }
/// <summary> /// Deprecated Method for adding a new object to the Customers EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToCustomers(Customer customer) { base.AddObject("Customers", customer); }