Initial version

This commit is contained in:
CodeLiturgy 2022-09-07 18:27:06 +01:00
parent 33fbb36fb8
commit dc23c79797
4 changed files with 18 additions and 32 deletions

View File

@ -20,13 +20,11 @@ namespace BlueWest.EfMethods.Sources
.WriteLine($"namespace {RootNamespace}") .WriteLine($"namespace {RootNamespace}")
.WriteOpeningBracket(); .WriteOpeningBracket();
if (options.GenerateXmlDocument) builder
{ .WriteLine("/// <summary>")
builder .WriteLine("/// Attribute for generating a function to get many entities.")
.WriteLine("/// <summary>") .WriteLine("/// </summary>");
.WriteLine("/// Attribute for generating a function to get one EF entity with a predicate as argument and a return type for the projection.")
.WriteLine("/// </summary>");
}
builder builder
.WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]")

View File

@ -20,14 +20,10 @@ namespace BlueWest.EfMethods.Sources
.WriteLine($"namespace {RootNamespace}") .WriteLine($"namespace {RootNamespace}")
.WriteOpeningBracket(); .WriteOpeningBracket();
if (options.GenerateXmlDocument) builder
{ .WriteLine("/// <summary>")
builder .WriteLine("/// Generate Get One Entity helper functions with the specified nameof of the property, and the return type.")
.WriteLine("/// <summary>") .WriteLine("/// </summary>");
.WriteLine("/// Generate Add methods for interacting with the entity")
.WriteLine("/// </summary>");
}
builder builder
.WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]")
.WriteLine($"public sealed class {AttributeName}Attribute : Attribute") .WriteLine($"public sealed class {AttributeName}Attribute : Attribute")

View File

@ -17,13 +17,10 @@ namespace BlueWest.EfMethods.Sources
.WriteLine($"namespace {RootNamespace}") .WriteLine($"namespace {RootNamespace}")
.WriteOpeningBracket(); .WriteOpeningBracket();
if (options.GenerateXmlDocument) builder
{ .WriteLine("/// <summary>")
builder .WriteLine("/// Generate update methods for this Db<Set> property")
.WriteLine("/// <summary>") .WriteLine("/// </summary>");
.WriteLine("/// Generate Add methods for interacting with the entity")
.WriteLine("/// </summary>");
}
builder builder
.WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]")
@ -31,9 +28,7 @@ namespace BlueWest.EfMethods.Sources
.WriteOpeningBracket(); .WriteOpeningBracket();
builder builder
.WriteLine($"public {AttributeName}Attribute(Type updateType, Type returnType, string keyPropertyMemberName)") .WriteLine($"public {AttributeName}Attribute(Type updateType, Type returnType, string keyPropertyMemberName){"{}"}")
.WriteOpeningBracket()
.WriteClosingBracket()
.WriteLine(); .WriteLine();
builder builder

View File

@ -20,13 +20,10 @@ namespace BlueWest.EfMethods.Sources
.WriteLine($"namespace {RootNamespace}") .WriteLine($"namespace {RootNamespace}")
.WriteOpeningBracket(); .WriteOpeningBracket();
if (options.GenerateXmlDocument) builder
{ .WriteLine("/// <summary>")
builder .WriteLine("/// Generate methods to get the first result with a given predicate.")
.WriteLine("/// <summary>") .WriteLine("/// </summary>");
.WriteLine("/// Attribute for generating a function to get one EF entity with a predicate as argument and a return type for the projection.")
.WriteLine("/// </summary>");
}
builder builder
.WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]")