Skip to content

EF core 7 API controller #2

Description

@AssisiWilfred

Can't able to auto create the controller for SP with primary key
image

Provide steps to reproduce
step 1=>After completing "Reverse Engineer" process in EF core power tool, "Right click" the controller to add a new controller.
step 2=>Click "Add" & click "Controller".
image

step 3=>Click "API" then click "API controller with actions, using entity framework".
image

step 4=>Click "Add" Button then give "Model class", "Data context class" & " Controller name".
image

step 5=>Click "Add" Button & it start scaffolding the code & it shows the error "Primary Key not found" even it have a primary key in its model.
image

EF Core Power Tools version: (7.0)
Database engine: (SQL Server)
Visual Studio version: (Visual Studio Community 2022 (17.4.3) )

Activity

  1. AssisiWilfred commented on Jan 6, 2023

    @AssisiWilfred
    Author

    Hi Patrick, I can't able to create an API controller with actions for auto generated model & data in EF core 7.
    Is there any solution for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions