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; } }
public static void Create(Dbo.Comment comment) { DataAccess.CommentCRUD.Create(comment); }