예제 #1
0
 /// <summary>
 /// Create a new Comment object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="postId">Initial value of the PostId property.</param>
 /// <param name="body">Initial value of the Body property.</param>
 /// <param name="approved">Initial value of the Approved property.</param>
 /// <param name="creationDate">Initial value of the CreationDate property.</param>
 /// <param name="userName">Initial value of the UserName property.</param>
 public static Comment CreateComment(global::System.Int32 id, global::System.Int32 postId, global::System.String body, global::System.Boolean approved, global::System.DateTime creationDate, global::System.String userName)
 {
     Comment comment = new Comment();
     comment.Id = id;
     comment.PostId = postId;
     comment.Body = body;
     comment.Approved = approved;
     comment.CreationDate = creationDate;
     comment.UserName = userName;
     return comment;
 }
예제 #2
0
 /// <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);
 }