Closed tkardaridis closed 8 months ago
Could you check the Extensions output window for any message?
You were so right. There was an error in SPs. Someone changed a column name but he didn't alter the SPs to change it there also. Thanks a lot. For your information: On reverse engineering when index exists the attribute Index is red underlined because there is an ambiguous between System.ComponentModel.DataAnnotations.Schema.IndexAttribute and Microsoft.EntityFrameworkCore.IndexAttribute. The last one is correct but I have to pass all the files to set it implicitly to fix the error and compile the project.
Thanks again for your help,
On Thu, Feb 15, 2024 at 4:42 PM Erik Ejlskov Jensen < @.***> wrote:
Could you check the Extensions output window for any message?
— Reply to this email directly, view it on GitHub https://github.com/ErikEJ/EFCorePowerTools/issues/2164#issuecomment-1946236019, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJURUUUXD3X2WCGYCJKDSF3YTYNGTAVCNFSM6AAAAABDKMEKZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBWGIZTMMBRHE . You are receiving this because you authored the thread.Message ID: @.***>
Feel free to create an issue gor the index attribute issue
Hi all. After upgrading on 2.6.140 and trying to reverse engineer my database, i realize that all the results objects from SPs are empty. See the attached image comparing the previous object with the newly generated from 2.6.140.
To reproduce the issue that I have, try to reverse engineer a database with SPs that returns data with select statement after executing a few operations. Consider the attached SP SQLQuery1.zip In the end there is a select query that returns data. In previous versions of EF Core Power Tools, a results file was generated as follows: `// This file has been auto generated by EF Core Power Tools.
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
nullable enable
namespace RenoptiTrader.Db.Models.Declarations { public partial class AvailabilitiesForecastResult { public int? SiteId { get; set; } public string SiteName { get; set; } = default!; [Column("CurrentAvailability", TypeName = "decimal(18,2)")] public decimal? CurrentAvailability { get; set; } public string? ValueHour { get; set; } } }`
With this version I am getting the following Results file `// This file has been auto generated by EF Core Power Tools.
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
nullable enable
namespace RenoptiTrader.Db.Models.DeclarationsSchema { public partial class AvailabilitiesForecastResult { } } `
Provide technical details
EF Core Power Tools version: 2.6.140 & 2.6.141
Exact Visual Studio version: Visual Studio 2022 17.9.0
Database engine: SQL Server
EF Core version in use: EF Core 7
Is Handlebars templates used: yes to make the context file that is being generated to inherit from another abstract class because I am using a centralized audit mechanism. The AuditContext inherits from DbContext and the generated context inherits from AuditContext. So I am using the handlebars to make it inherit from AuditContext on generation.
Is T4 templates used: no
Is a SQL Server .dacpac used: no