public IActionResult UniversityFullInfo(int IDUniversity) { var university = _universityRepository.Get(IDUniversity); var universityViewModel = Mapper.Map <UniversityViewModel>(university); universityViewModel.StudentCount = university.Students.Count(); return(View(universityViewModel)); }
public async Task <PaginatedList <UniversityModel> > Get(SearchModel model) { var spec = model.ToSpecification <University>(); var entities = await repository.Get(spec); var count = await repository.CountAsync(); return(new PaginatedList <UniversityModel>( model.PageIndex, entities.Count, count, mapper.Map <IList <UniversityModel> >(entities))); }
public TEntity Get(int id) { return(repo.Get(id)); }
public ActionResult Edit(int id) { return(View(uniRepo.Get(id))); }