Click here to Skip to main content
15,879,490 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working through the Book "Pro ASP.NET MVC 5 - Adam Freeman
' . In chapter 7 the Sportstore application is built and the Products are first displayed with the Mock Repository on page 174. Everything works fine up to here.

Now this is to be replaced with the real Product data using Entity Framework. I did everything as the book says , Adding the Real Repository Binding in the NinjectDependencyResolver.cs File as on page 182, but when running it, it displays a blank page. In other words it does not have products to display.

I am lost as I do not know where to start debugging it. The table definitely does have the data in it.

Please help - I have re-done this application 3 times and I still get the same result - your assistance is highly appreciated
Posted
Comments
Jameel VM 1-Dec-14 0:27am    
any exception?

1 solution

Unless you paste your code snippet where the exception or empty record is returned then the below are the steps we can ask you to follow:

1: Please debug and add a breakpoint on the action of the controller that returns the products data list.

2: Check here if the data is being returned.

3: If data is being returned then check the view page if that has an IEnumerable of the model. So that the list of data can be accessed through @foreach(var item in model)

4. You can also check your web.config connection strings and the service method where you are doing the database operation(if any exception).

Post back your queries if any.
Thanks. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900