Beispiel #1
0
 public bool insertComment(int userid, int eventid, string comment)
 {
     comment new_c = new comment { UserID = userid, EventID = eventid, Comment1 = comment, timestamp = DateTime.Now};
     _db.comments.AddObject(new_c);
     _db.SaveChanges();
     return true;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the comments EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTocomments(comment comment)
 {
     base.AddObject("comments", comment);
 }
 /// <summary>
 /// Create a new comment object.
 /// </summary>
 /// <param name="commentID">Initial value of the CommentID property.</param>
 /// <param name="eventID">Initial value of the EventID property.</param>
 /// <param name="comment1">Initial value of the Comment1 property.</param>
 /// <param name="userID">Initial value of the UserID property.</param>
 public static comment Createcomment(global::System.Int32 commentID, global::System.Int32 eventID, global::System.String comment1, global::System.Int32 userID)
 {
     comment comment = new comment();
     comment.CommentID = commentID;
     comment.EventID = eventID;
     comment.Comment1 = comment1;
     comment.UserID = userID;
     return comment;
 }