mosh-hamedani/vidly-mvc-5

Error while doing Lecture 29 : _context is not fetching data

varu07n opened this issue · 2 comments

The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Details(Int32)' in 'NewApplication2.Controllers.CustomerController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters
My controller:
image
image

in the view page am not getting customer.Name attribute
image

pls help me out

Try this:

public CustomersController(ApplicationDbContext context)        
        {
            this.context = context;
        }