Пример #1
0
        public bool CreateComment(T_Comment comment, long idUser, long idBug)
        {
            using (BugTrackLikeEntities bugtrack = new BugTrackLikeEntities ())
            {
                comment.T_User.id = idUser;
                comment.T_Bug.id = idBug;

                bugtrack.AddToT_Comment(comment);
                bugtrack.SaveChanges();
                return true;
            }
        }
Пример #2
0
        public bool UpdateComment(T_Comment comment)
        {
            using (BugTrackLikeEntities bugtrack = new BugTrackLikeEntities())
            {
                T_Comment com = bugtrack.T_Comment.Where(c => c.id == comment.id).FirstOrDefault();

                if (com != null)
                {
                    com = comment;
                }
                bugtrack.SaveChanges();
                return true;
            }
        }
Пример #3
0
 /// <summary>
 /// Create a new T_Comment object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="details">Initial value of the details property.</param>
 public static T_Comment CreateT_Comment(global::System.Int64 id, global::System.String details)
 {
     T_Comment t_Comment = new T_Comment();
     t_Comment.id = id;
     t_Comment.details = details;
     return t_Comment;
 }
Пример #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the T_Comment EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToT_Comment(T_Comment t_Comment)
 {
     base.AddObject("T_Comment", t_Comment);
 }