Closed GearTheWorld closed 3 years ago
Have you checked the output window for errors?
The output window shows nothing
There's something written about the SP in the config files
{
"Name": "[dbo].[GetShipments]",
"ObjectType": 1
}
Are you able to generate other stored procedures from the same database?
Can you run: sp_describe_first_result_set against it?
I ran the script and it generates the data beautifully with everything described correctly
Could you share your generated code, I cannot implement the stored procedure without the referenced tables
What do you mean by generated code?
The code generated by power Tools.
Sadly, it generates nothing
I can give you a video of what is going on if you want
What makes you think no code is generated? I prefer a repo project / schema
Ok let me prepare you a repo. Hold on
Here it is. In the main project, you have a folder called Files in which I added the entire database script and the project CubiDataStore is the one to use the EF Core Power Tool
Hope this helps RepoForErik.zip
Yes, that helped, the stored procedures depend on a DbContext, and you have selected to only generate Entity Types!
You need to refactor your "DataStore.cs" so at least some parts of it is generated by EF Core Power Tools!
Thank you Erik
Finally, my DataStore.cs is useless. I removed it and now I'm using the tool to generates the ApplicationDbContext
I will log an error if sprocs or functions are selected when generating entities only.
Describe what is not working as expected.
Steps to reproduce I just try to add a stored procedure and despite having a message of success I have nothing, no function import, no complex type. I don't know what I'm doing wrong. I attached my Stored Procedure and the config file
Files.zip
EF Core Power Tools Version Version 2.5.612.0 SQLite ADO.NET Provider included: 1.0.109.0 SQLite EF6 DbProvider in GAC - No System.Data.SQLite DDEX provider - No SQLite Simple DDEX provider - Yes
Database engine: (SQlite, SQL Compact, SQL Server, Postgres) SQL Server 2016
Visual Studio version: (e.g. Visual Studio 2019 16.8) Microsoft Visual Studio Professional 2019 Version 16.9.4 VisualStudio.16.Release/16.9.4+31205.134 Microsoft .NET Framework Version 4.8.04084