This is the code of the MarcaController file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Tienda.Models;
namespace Tienda.Controllers
{
public class MarcaController : Controller
{
private TiendaConexion db = new TiendaConexion();
// GET: Marca
public ActionResult Index()
{
return View(db.Marca.ToList());
}
// GET: Marca/Details/5
public ActionResult Details(int id)
{
return View();
}
// GET: Marca/Create
public ActionResult Create()
{
return View();
}
// POST: Marca/Create
[HttpPost]
public ActionResult Create(FormCollection collection)
{
try
{
// TODO: Add insert logic here
return RedirectToAction("Index");
}
catch
{
return View();
}
}
// GET: Marca/Edit/5
public ActionResult Edit(int id)
{
return View();
}
// POST: Marca/Edit/5
[HttpPost]
public ActionResult Edit(int id, FormCollection collection)
{
try
{
// TODO: Add update logic here
return RedirectToAction("Index");
}
catch
{
return View();
}
}
// GET: Marca/Delete/5
public ActionResult Delete(int id)
{
return View();
}
// POST: Marca/Delete/5
[HttpPost]
public ActionResult Delete(int id, FormCollection collection)
{
try
{
// TODO: Add delete logic here
return RedirectToAction("Index");
}
catch
{
return View();
}
}
}
}
When I try to create the view for the index I get this error