I need to bring only 6 records of the database to display in View, instead of just 6 records, it's all coming up.
The code is as follows:
public PartialViewResult Cursos()
{
ViewBag.Cursos = new CursoRepositorio().BuscarTodos().Take(6).ToArray();
return PartialView();
}