// GET: Compras public ActionResult Index() { var userid = User.Identity.GetUserId(); RepoDapper Repo = new RepoDapper(); var comprasList = Repo.GetMisPedidos(userid); //var comprasList = db.Compras.Where(x => x.UserId == userId).ToList(); return(View(comprasList)); }