Quantcast
Channel: MVC controller and repository model - Stack Overflow
Browsing latest articles
Browse All 3 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 latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>