mardi 12 novembre 2019

ASP.NET Core & EF Core - Présentation 2

Ce n'est pas facile de s'y retrouver dans tous ces modèles d'applications : ASP.NET avec MVC Razor Blazor, Angular CLI etc... Je tente de recréer un projet Angular, j'arrive dans le répertoire Migration et poof !

Surtout après l'article : ASP.NET Core & Entity Framework - Présentation 1

Je souhaite simplement faire : Update-Database :


PowerShell : Update-Database does not fonctionne on Angular Project
Si j'utilise maintenant la fenêtre de commande DOS :

Command DOS : dotnet ef database update does not fonctionne on Angular Project
Et donc, on découvre que Entity Framework possède une version Core qui ne fonctionne pas de la même façon, lein lein.

Me voilà plongé dans :

Informations de référence sur les outils Entity Framework Core-CLI .NET

Tuto rapide :

PM> dotnet ef
                     _/\__      
               ---==/    \\     
         ___  ___   |.    \|\   
        | __|| __|  |  )  
\\\  
        | _| | _|   \_/ |  //|\\
        |___||_|       /  
\\\/\\
Entity Framework Core .NET Command-line Tools 2.2.6-servicing-10079
Usage: dotnet ef [options] [command]
Options:
  --version        Show version information
  -h|--help        Show help information
  -v|--verbose     Show verbose output.
  --no-color       Don't colorize output.
  --prefix-output  Prefix output with level.

Commands:
  database    Commands to manage the database.
  dbcontext   Commands to manage DbContext types.
  migrations  Commands to manage migrations.

Use "dotnet ef [command] --help" for more information about a command.

Du coup je tape la commande :

PM> dotnet ef --version
Entity Framework Core .NET Command-line Tools
2.2.6-servicing-10079


Mince mais c'est le moyen âge ici !

Aucun commentaire:

Enregistrer un commentaire

Remarque : Seul un membre de ce blog est autorisé à enregistrer un commentaire.