Example #1
0
 public static void Create(Dbo.Comment comment)
 {
     try
     {
         using (Entities bdd = new Entities())
         {
             bdd.T_Comment.Add(new T_Comment()
             {
                 UserId       = comment.UserId,
                 ArticleId    = comment.ArticleId,
                 Comment      = comment.Content,
                 CreationDate = comment.CreationDate
             });
             bdd.SaveChanges();
         }
     }
     catch (Exception e)
     {
         Trace.WriteLine(e.Message);
         throw;
     }
 }
Example #2
0
 public static void Create(Dbo.Comment comment)
 {
     DataAccess.CommentCRUD.Create(comment);
 }