correccion plantillas

This commit is contained in:
2026-09-07 12:29:32 +02:00
parent 160122ce5e
commit c5494f60e6
2 changed files with 4 additions and 16 deletions

View File

@@ -339,13 +339,6 @@ public partial class <#= Options.ContextName #> : DbContext
<# <#
mainEnvironment = GenerationEnvironment; mainEnvironment = GenerationEnvironment;
GenerationEnvironment = new StringBuilder(); GenerationEnvironment = new StringBuilder();
WriteLine("// <auto-generated> This file has been auto generated by EF Core Power Tools. </autogenerated>");
if (Options.UseNullableReferenceTypes)
{
WriteLine("#nullable enable");
}
WriteLine("");
foreach (var ns in usings.Distinct().OrderBy(x => x, new NamespaceComparer())) foreach (var ns in usings.Distinct().OrderBy(x => x, new NamespaceComparer()))
{ {

View File

@@ -28,7 +28,8 @@
var usings = new List<string> var usings = new List<string>
{ {
"System", "System",
"System.Collections.Generic" "System.Collections.Generic",
"PropertyChanged"
}; };
if (Options.UseDataAnnotations) if (Options.UseDataAnnotations)
@@ -65,7 +66,8 @@ namespace <#= NamespaceHint #>;
} }
} }
#> #>
public partial class <#= EntityType.Name #> [AddINotifyPropertyChangedInterface]
public partial class <#= EntityType.Name #>
{ {
<# <#
var firstProperty = true; var firstProperty = true;
@@ -160,13 +162,6 @@ public partial class <#= EntityType.Name #>
<# <#
var previousOutput = GenerationEnvironment; var previousOutput = GenerationEnvironment;
GenerationEnvironment = new StringBuilder(); GenerationEnvironment = new StringBuilder();
WriteLine("// <auto-generated> This file has been auto generated by EF Core Power Tools. </autogenerated>");
if (Options.UseNullableReferenceTypes)
{
WriteLine("#nullable enable");
}
WriteLine("");
foreach (var ns in usings.Distinct().OrderBy(x => x, new NamespaceComparer())) foreach (var ns in usings.Distinct().OrderBy(x => x, new NamespaceComparer()))
{ {