Scaffolding (DB first) does not generate Model class

Jia soon Loo 0 Reputation points
2024-09-17T03:18:53.1433333+00:00

Hi I tried to generate model class based on existing view. This is the command I used in PMC:

Scaffold-DbContext "//connectionstring" Oracle.EntityFrameworkCore -schema //schema -table //table -OutputDir Models

My Command in PMC

It seems like it is working. However it does not generate anything in my solution explorer. I have also tried

dotnet ef dbcontext scaffold

in .Net Core CLI. It did not generate anything as well. Is there anything I missed out?

Below are the dependencies in my project. I am using .NET 8.0, console app.

User's image

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
736 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jia soon Loo 0 Reputation points
    2024-09-17T03:23:36.4366667+00:00

    I changed my command in PMC to

    Scaffold-DbContext "//connectionstring" Oracle.EntityFrameworkCore -Table //schemaName.tableName -OutputDir Models

    It took quite a while to finally generate the folder Models with context class and model class in it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.