Esempio n. 1
0
        public void CheckAny()
        {
            IDataProvider data              = new MongoDataProvider();
            var           course            = new BLL.Course();
            var           enumerableCourses = data.GetMultipleUsingAny <DAL.Course>("Subscribed", "*****@*****.**");

            course.ModelCourses = new List <Model.Course>();
            foreach (var enumerableCourse in enumerableCourses)
            {
                course.ModelCourses.Add(enumerableCourse);
            }
        }
Esempio n. 2
0
 public static Course GetSubscribedCourses(string email)
 {
     try
     {
         IDataProvider data              = new MongoDataProvider();
         var           course            = new Course();
         var           enumerableCourses = data.GetMultipleUsingAny <DAL.Course>("Subscribed", email);
         course.ModelCourses = new List <Model.Course>();
         foreach (var enumerableCourse in enumerableCourses)
         {
             enumerableCourse.Identification = enumerableCourse._id.ToString();
             course.ModelCourses.Add(enumerableCourse);
         }
         return(course);
     }
     catch (Exception)
     {
         return(null);
     }
 }