Ejemplo n.º 1
0
        public IHttpActionResult Get()
        {
            var majors = _majorService.GetAll();

            return(Ok(majors
                      .Select(m =>
            {
                return GetMajorDto(m);
            })));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetAllMajor()
        {
            var mjs = await _majorService.GetAll();

            if (mjs.Count == 0)
            {
                return(NotFound());
            }
            var res = _mapper.Map <List <MajorDto> >(mjs);

            return(Ok(res));
        }
Ejemplo n.º 3
0
 public IActionResult Get()
 {
     return(Ok(majorService.GetAll()));
 }