Quantcast
Channel: MVC controller and repository model - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Andy Rose for MVC controller and repository model

You are returning the repository in the View not the Product. Change it to this:var product = repo.GetProductID(id);return View(product );

View Article



Answer by musefan for MVC controller and repository model

Easy one, just pass in the right type of Model/Class. If you definitely want to pass a ProductRepository Model then change the first line of your View page to be...<%@ Page Title="" Language="C#"...

View Article

MVC controller and repository model

I keep getting an error saying that:The model item passed into the dictionary is of type 'HomebaseSystemNew.Controllers.ProductRepository', but this dictionary requires a model item of type...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images