Beispiel #1
0
        public ActionResult SearchClasses(String query)
        {
            IList <ClasseModels> models = new List <ClasseModels>();

            using (ClasseRepository repository = new ClasseRepository())
            {
                models = repository.GetClassesByQuery(query).Select(x => new ClasseModels
                {
                    id              = x.Id,
                    title           = x.Title,
                    userId          = x.User_Id,
                    yearId          = x.Year_Id,
                    etablissementId = x.Establishment_Id,
                }).ToList();
            }
            return(PartialView("_classesList", models));
        }