Наследование: System.Data.Objects.DataClasses.EntityObject
Пример #1
0
        public void Add(Status status, IEnumerable<User> users)
        {
            foreach (var user in users)
            {
                var wallItem = new WallItem {
                    Unread = true,
                    Status = status,
                    User = user,
                };

                db.WallItemSet.AddObject(wallItem);
            }

            db.SaveChanges();
        }
Пример #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the WallItemSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToWallItemSet(WallItem wallItem)
 {
     base.AddObject("WallItemSet", wallItem);
 }
Пример #3
0
 /// <summary>
 /// Create a new WallItem object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="unread">Initial value of the Unread property.</param>
 public static WallItem CreateWallItem(global::System.Int32 id, global::System.Boolean unread)
 {
     WallItem wallItem = new WallItem();
     wallItem.Id = id;
     wallItem.Unread = unread;
     return wallItem;
 }