Пример #1
0
        // GET: Courses
        public async Task <ActionResult> Index()
        {
            var data = await coursesRepository.GetAllAsync();

            var model = data.Select(x => new CourseModel
            {
                Id         = x.Id,
                LectorName = x.LectorName,
                Name       = x.Name
            });

            return(View(model));
        }