Inheritance: 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;
 }