コード例 #1
0
 public void AddOwnerToList(int listId, Guid owner)
 {
     using (var db = new TRIPS_UserEntities())
     {
         var clo = new ContactList_Owner()
         {
             DateCreated = DateTime.UtcNow,
             ContactList_Id = listId,
             UserId = owner
         };
         db.AddToContactList_Owner(clo);
         db.SaveChanges();
     }
 }
コード例 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ContactList_Owner EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContactList_Owner(ContactList_Owner contactList_Owner)
 {
     base.AddObject("ContactList_Owner", contactList_Owner);
 }
コード例 #3
0
 /// <summary>
 /// Create a new ContactList_Owner object.
 /// </summary>
 /// <param name="contactList_Id">Initial value of the ContactList_Id property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="dateCreated">Initial value of the DateCreated property.</param>
 public static ContactList_Owner CreateContactList_Owner(global::System.Int32 contactList_Id, global::System.Guid userId, global::System.DateTime dateCreated)
 {
     ContactList_Owner contactList_Owner = new ContactList_Owner();
     contactList_Owner.ContactList_Id = contactList_Id;
     contactList_Owner.UserId = userId;
     contactList_Owner.DateCreated = dateCreated;
     return contactList_Owner;
 }