public MajorViewModel GetMajors() { return(new MajorViewModel() { majors = _majorRepository.GetMajors() }); }
public IActionResult Index() { var majors = new List <ViewMajor>(); majors = majorRepository.GetMajors().ToList(); return(View(majors)); }
public async Task <QueryResultResource <MajorResource> > GetMajors(QueryResource queryResource) { var query = mapper.Map <QueryResource, Query>(queryResource); var queryResult = await repository.GetMajors(query); return(mapper.Map <QueryResult <Major>, QueryResultResource <MajorResource> >(queryResult)); }