Error while doing Lecture 29 : _context is not fetching data
varu07n opened this issue · 2 comments
varu07n commented
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:
in the view page am not getting customer.Name attribute
pls help me out
fathi-ch commented
Try this:
public CustomersController(ApplicationDbContext context)
{
this.context = context;
}