Model ApplicationUser does not appear in the ModelClass list

1

When I try to add a scafolding with Entity Framework the class that is in .Models does not appear, it is called ApplicationUser and it is not in the list, how the charge?

Listing:

    
asked by CeciPeque 24.07.2018 в 21:02
source

2 answers

0

The reason 3 most common reasons for a model not to be listed

  • you have not compiled your solution after creating the model
  • you have not put the model in the indicated folder, the scafolding is oriented by conventions
  • the model, the class is not marked as public
  • answered by 03.10.2018 в 19:36
    0

    First you must go to the folder where the project is and there you open the powershell

    so you can execute the following code.

    dotnet aspnet-codegenerator controller -name UsuariosController -m ApplicationUser -dc ApplicationDbContext --relativeFolderPath Controllers --useDefaultLayout --referenceScriptLibraries
    

    Note: The project must be closed in Visual Studio.

    and you'll get the User driver and its views

        
    answered by 05.10.2018 в 05:54