/// <summary> /// Create a new NewsFeedEntry object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="newsFeedId">Initial value of the NewsFeedId property.</param> /// <param name="title">Initial value of the Title property.</param> /// <param name="createdBy">Initial value of the CreatedBy property.</param> /// <param name="createdOn">Initial value of the CreatedOn property.</param> public static NewsFeedEntry CreateNewsFeedEntry(global::System.Int32 id, global::System.Int32 newsFeedId, global::System.String title, global::System.String createdBy, global::System.DateTime createdOn) { NewsFeedEntry newsFeedEntry = new NewsFeedEntry(); newsFeedEntry.Id = id; newsFeedEntry.NewsFeedId = newsFeedId; newsFeedEntry.Title = title; newsFeedEntry.CreatedBy = createdBy; newsFeedEntry.CreatedOn = createdOn; return(newsFeedEntry); }
public int AddEntry(SourceEntryObj e, string username) { using (var db = GetNewsFeedEntities()) { var dbEntry = new NewsFeedEntry { Title = e.Title, Message = e.Message, CreatedOn = DateTime.Now, CreatedBy = username }; db.NewsFeedEntries.AddObject(dbEntry); db.SaveChanges(); return dbEntry.Id; } }
/// <summary> /// Deprecated Method for adding a new object to the NewsFeedEntries EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToNewsFeedEntries(NewsFeedEntry newsFeedEntry) { base.AddObject("NewsFeedEntries", newsFeedEntry); }
/// <summary> /// Create a new NewsFeedEntry object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="newsFeedId">Initial value of the NewsFeedId property.</param> /// <param name="title">Initial value of the Title property.</param> /// <param name="createdBy">Initial value of the CreatedBy property.</param> /// <param name="createdOn">Initial value of the CreatedOn property.</param> public static NewsFeedEntry CreateNewsFeedEntry(global::System.Int32 id, global::System.Int32 newsFeedId, global::System.String title, global::System.String createdBy, global::System.DateTime createdOn) { NewsFeedEntry newsFeedEntry = new NewsFeedEntry(); newsFeedEntry.Id = id; newsFeedEntry.NewsFeedId = newsFeedId; newsFeedEntry.Title = title; newsFeedEntry.CreatedBy = createdBy; newsFeedEntry.CreatedOn = createdOn; return newsFeedEntry; }
/// <summary> /// Deprecated Method for adding a new object to the NewsFeedEntries EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToNewsFeedEntries(NewsFeedEntry newsFeedEntry) { base.AddObject("NewsFeedEntries", newsFeedEntry); }