예제 #1
0
 /// <summary>
 /// Binds the surrogate values to the search template.
 /// </summary>
 /// <param name="emptyTemplate">The empty template.</param>
 public void BindToSearchTemplate(CustomerTemplate emptyTemplate)
 {
     if (this.MailingAddressID != null)
     emptyTemplate.MailingAddressID = this.MailingAddressID.Value;
     if (this.DeliveryAddressID != null)
     emptyTemplate.DeliveryAddressID = this.DeliveryAddressID.Value;
     if (this.StatusID != null)
     emptyTemplate.StatusID = this.StatusID.Value;
 }
예제 #2
0
 /// <summary>
 /// SQL like query to find and return a list of objects based on a template.</summary>
 /// <remarks> A query template is used for creating SQL like queries, in a more OO fashion.</remarks>
 /// <param name="template">CustomerTemplate.</param>
 /// <returns> ObjectList&lt;Customer&gt; </returns>
 public ObjectList<Customer> Find(CustomerTemplate template)
 {
     ObjectList<Customer> c = new ObjectList<Customer>();
     foreach(Customer eo in base.Find(template))
     c.Add(eo);
     return c;
 }