Exemple #1
0
 public bool CheackTakenCourse(TakenCourse takenCourses)
 {
     try
     {
         return(db.TakenCourse.Where(x => x.CoureseId == takenCourses.CoureseId && x.ID == takenCourses.ID).FirstOrDefault() != null);
     }
     catch (Exception ex)
     {
         var x = ex.Message;
         return(false);
     }
 }
Exemple #2
0
 public bool BindCourse(TakenCourse takenCourses)
 {
     try
     {
         db.TakenCourse.Add(takenCourses);
         db.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         var x = ex.Message;
         return(false);
     }
 }