public List <Class> GetAllClasses()
        {
            var business = ClassBusiness.Instance;
            var request  = new GetAllClassesRequest(this.Context);
            var classes  = business.GetAllClasses(request);

            return(classes);
        }
Exemple #2
0
        public List <Class> GetAllClasses(GetAllClassesRequest request)
        {
            List <Class> classes = null;

            if (request != null)
            {
                var dataAccess = new ClassDataAccess(request.Context);

                var classesQuery = dataAccess.GetAll();

                classesQuery = classesQuery.Include(c => c.Academy);

                classes = classesQuery.ToList();
            }

            return(classes);
        }