Well I just took a look at your repository and as I can see two errors that do not allow you to load the page correctly. Of course you have to give another turn to what is the MVC pattern but this will allow you to at least execute it:
On the one hand in your class HomeController
:
public ActionResult Index()
{
//var viewModel = Modelo.RepositorioRecetas.GetRecetas(); Código antiguo
var viewModel = new Modelos();
return View(viewModel);
}
On the other hand, in the class Modelos
add a constructor that initializes the necessary, for example:
public Modelos()
{
RepositorioRecetas = new RepositorioRecetas();
}
If then on the main page in the body of Index.cshtml
you make the following change:
@if (Model.RepositorioRecetas != null)
{
<div class="row">
@* Linea que tenias anteriormente y he comentado *@
@*@foreach (Receta receta in Model.RepositorioRecetas)*@
@foreach (Receta receta in Model.RepositorioRecetas.GetRecetas())
{
<div class="col-md-4">
<div class="well">
<h4>@Html.ActionLink(receta.Titulo, "Receta", new { id = receta.Id, @class = "Recetas" })</h4>
<a href="@Url.Action("Receta", new {id = receta.Id})">
<img src="~/img/fotos/@receta.CoverImageFileName" alt="@receta.MostrarTexto" class="img-responsive" />
</a>
</div>
</div>
}
</div>
}
With this you already load at least the main page.
A lot of encouragement and patience