//Get one comment
 public Tblcomments GetOneComment(int id)
 {
     try
     {
         Tblcomments comment = db.Tblcomments.Find(id);
         return(comment);
     }
     catch
     {
         throw;
     }
 }
 //To Update comment
 public int UpdateComment(Tblcomments comment)
 {
     try
     {
         db.Entry(comment).State = EntityState.Modified;
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
 //To Add new comment
 public int AddComment(Tblcomments comment)
 {
     try
     {
         db.Tblcomments.Add(comment);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
 //To Delete the record of a particular employee
 public int DeleteComment(int id)
 {
     try
     {
         Tblcomments comment = db.Tblcomments.Find(id);
         db.Tblcomments.Remove(comment);
         db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }