Beispiel #1
0
        // GET api/Courses
        public IEnumerable <CourseServiceModel> Get()
        {
            var result = coursesRepository.All().Select(x => new CourseServiceModel
            {
                Id          = x.Id,
                Name        = x.Name,
                Description = x.Description
            }).ToList();

            return(result);
        }
 public async Task <ActionResult <List <Course> > > Index()
 {
     return(await _rep.All());
 }