public AddCommentToStatus ( |
||
author | autor komentáře | |
commentedStatus | status, který je komentován | |
text | string | text komentáře |
return | void |
public void AddCommentToStatus(User author, Status commentedStatus, string text)
{
//if (commentedStatus != null)
//{
Comment comm = new Comment();
comm.Author = author;
comm.CommentStatus = commentedStatus;
comm.Text = text;
comm.Created = DateTime.Now;
db.CommentSet.AddObject(comm);
db.SaveChanges();
//}
}