Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while doing Lecture 29 : _context is not fetching data #194

Open
varu07n opened this issue Jul 4, 2021 · 2 comments
Open

Error while doing Lecture 29 : _context is not fetching data #194

varu07n opened this issue Jul 4, 2021 · 2 comments

Comments

@varu07n
Copy link

varu07n commented Jul 4, 2021

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

@fathi-ch
Copy link

fathi-ch commented Oct 2, 2021

Try this:

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

@loblachi
Copy link

Bro it looks like you are in the wrong View , you are in the about view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants