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}")
.WriteOpeningBracket();
if (options.GenerateXmlDocument)
{
builder
.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("/// Attribute for generating a function to get many entities.")
.WriteLine("/// </summary>");
}
builder
.WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]")

View File

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

View File

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

View File

@ -20,13 +20,10 @@ namespace BlueWest.EfMethods.Sources
.WriteLine($"namespace {RootNamespace}")
.WriteOpeningBracket();
if (options.GenerateXmlDocument)
{
builder
.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("/// Generate methods to get the first result with a given predicate.")
.WriteLine("/// </summary>");
}
builder
.WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]")