// GET: Students/Details/5 public async Task <ActionResult> Details(int id) { var data = await coursesRepository.GetSingleAsync(id); var model = new StudentModel { Id = data.Id, AverageMark = data.AverageMark, BirthYear = data.BirthYear, FirstName = data.FirstName, LastName = data.LastName, GroupId = data.GroupId }; return(View(model)); }