Ejemplo n.º 1
0
 public int CreateContactList(ConModels.ContactList list)
 {
     using (var db = new TRIPS_UserEntities())
     {
         var cl = new ContactList()
         {
             DateCreated = DateTime.UtcNow,
             LastModified = DateTime.UtcNow,
             IsActive = true,
             IsPrivate = list.IsPrivate,
             Name = list.Name
         };
         db.AddToContactLists(cl);
         db.SaveChanges();
         return cl.Id;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ContactLists EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToContactLists(ContactList contactList)
 {
     base.AddObject("ContactLists", contactList);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Create a new ContactList object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="isPrivate">Initial value of the IsPrivate property.</param>
 /// <param name="isActive">Initial value of the IsActive property.</param>
 /// <param name="lastModified">Initial value of the LastModified property.</param>
 /// <param name="dateCreated">Initial value of the DateCreated property.</param>
 public static ContactList CreateContactList(global::System.Int32 id, global::System.String name, global::System.Boolean isPrivate, global::System.Boolean isActive, global::System.DateTime lastModified, global::System.DateTime dateCreated)
 {
     ContactList contactList = new ContactList();
     contactList.Id = id;
     contactList.Name = name;
     contactList.IsPrivate = isPrivate;
     contactList.IsActive = isActive;
     contactList.LastModified = lastModified;
     contactList.DateCreated = dateCreated;
     return contactList;
 }