Ejemplo n.º 1
0
 public static string GetReviewerUsername(LecturerReview lecturerReview)
 {
     using (var db = new Context(dbPath))
     {
         string reviewerUsername = db.Users.FirstOrDefault(u => u.Id == lecturerReview.UserId).Username;
         return(enc.Decrypt(reviewerUsername));
     }
 }
Ejemplo n.º 2
0
 public static void EditReview(LecturerReview review)
 {
     using (var db = new Context(dbPath))
     {
         db.Update(review);
         db.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public static void DeleteReview(LecturerReview review)
 {
     using (var db = new Context(dbPath))
     {
         db.Remove(review);
         db.SaveChanges();
     }
 }
Ejemplo n.º 4
0
 public static void AddReview(LecturerReview review)
 {
     using (var db = new Context(dbPath))
     {
         db.LecturerReviews.Add(review);
         db.SaveChanges();
     }
 }