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

@@ -340,13 +340,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,6 +66,7 @@ namespace <#= NamespaceHint #>;
} }
} }
#> #>
[AddINotifyPropertyChangedInterface]
public partial class <#= EntityType.Name #> public partial class <#= EntityType.Name #>
{ {
<# <#
@@ -161,13 +163,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()))
{ {
#> #>