Inheritance: System.Data.Objects.DataClasses.EntityObject
示例#1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Contacts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContacts(Contact contact)
 {
     base.AddObject("Contacts", contact);
 }
示例#2
0
 /// <summary>
 /// Create a new Contact object.
 /// </summary>
 /// <param name="contactId">Initial value of the ContactId property.</param>
 /// <param name="isPrimary">Initial value of the IsPrimary property.</param>
 /// <param name="customerId">Initial value of the CustomerId property.</param>
 /// <param name="firstName">Initial value of the FirstName property.</param>
 /// <param name="lastName">Initial value of the LastName property.</param>
 /// <param name="email">Initial value of the Email property.</param>
 /// <param name="phone">Initial value of the Phone property.</param>
 public static Contact CreateContact(global::System.Int32 contactId, global::System.Boolean isPrimary, global::System.Int32 customerId, global::System.String firstName, global::System.String lastName, global::System.String email, global::System.String phone)
 {
     Contact contact = new Contact();
     contact.ContactId = contactId;
     contact.IsPrimary = isPrimary;
     contact.CustomerId = customerId;
     contact.FirstName = firstName;
     contact.LastName = lastName;
     contact.Email = email;
     contact.Phone = phone;
     return contact;
 }