When trying to sketch using the asp.net kernel, this command
scaffold-dbcontext "Data source = (local); Start Directory = MyDb; Integrated Security = True;" Microsoft.EntityFrameworkCore.sqlserver -outputdir Models
Gives this error.
scaffold-dbcontext: the term "scaffold-dbcontext" is not recognized as the name of a cmdlet, function, script file, or executable program. Check the spelling of the name or indicate the path to it. that the path is correct and try again. On line: 1 char: 1 + scaffold-dbcontext "Data source = (local); Start directory = MyDB; B ... + ~~~~~~~~~~~~~~~~~~ CategoryInfo: ObjectNotFound: (scaffold-dbcontext: String) [], CommandNotFoundException + FullyQualifiedErrorId: CommandNotFoundException
I tried the solution here , but this does not work for me.
Any idea what could be the cause / cure?
-, ,
Install-Package Microsoft.EntityFrameworkCore.Tools
, :
(, Microsoft.EntityFrameworkCore, Microsoft.EntityFrameworkCore.SqlServer, Microsoft.EntityFrameworkCore.SqlServer.Design...) .
PM ( , ...)
, : dbcontext, , :
Microsoft.EntityFrameworkCore.SqlServer. , .
, VS ( , ).
: NuGet .
NuGet .
Devanathan , , NuGet .
.NetCore 2.2, Git Bash. , , .
, C:\App\ProjectName:
dotnet ef dbcontext scaffold "Server=.\;Database=Databasename;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -o Model
... Microsoft, .
:
Scaffold - DbContext "Server=(localdb)\mssqllocaldb;Database=myDbName;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer - OutputDir Models
Scaffold-DbContext "Server=(localdb)\mssqllocaldb;Database=myDbName;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
, , Visual Studio.
https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db
Source: https://habr.com/ru/post/1654362/More articles:How to test async method in block using OCMock - objective-c-blockshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1654358/play-scala-25-testing-classes-injecting-cache-leads-to-an-error&usg=ALkJrhhSnUhi5CxsYXhmMQl3n_VpRyChsgEnable autoscaling when creating a GKE cluster - autoscalingGmail: cannot read data from transport connection: net_io_connectionclosed - c #When to use cudaHostRegister () and cudaHostAlloc ()? What is the meaning of "memory with a pin or locked"? What is equivalent in OpenCL? - memory-managementDefinition of time complexity - performanceUsing -fno-unind-tables in conjunction with -fno-exceptions - c ++In unit test, execute the block queued with dispatch_asyc - iosgcc: error trying to execute exec 'cc1plus': execvp: no such file or directory - gccConfiguring ASP.Net core for authentication using OIDC vs Thinktecture V2 - asp.net-coreAll Articles