diff --git a/src/EfficientDynamoDb/Attributes/DynamoDbPropertyAttribute.cs b/src/EfficientDynamoDb/Attributes/DynamoDbPropertyAttribute.cs index 478373c5..797694ab 100644 --- a/src/EfficientDynamoDb/Attributes/DynamoDbPropertyAttribute.cs +++ b/src/EfficientDynamoDb/Attributes/DynamoDbPropertyAttribute.cs @@ -1,4 +1,6 @@ using System; +using System.Runtime.CompilerServices; + // ReSharper disable IntroduceOptionalParameters.Global namespace EfficientDynamoDb.Attributes @@ -11,7 +13,7 @@ public sealed class DynamoDbPropertyAttribute : Attribute public DynamoDbAttributeType AttributeType { get; } - public DynamoDbPropertyAttribute(string name) : this(name, null, DynamoDbAttributeType.Regular) + public DynamoDbPropertyAttribute([CallerMemberName] string name = default!) : this(name, null, DynamoDbAttributeType.Regular) { } @@ -23,6 +25,18 @@ public DynamoDbPropertyAttribute(string name, DynamoDbAttributeType attributeTyp { } + public DynamoDbPropertyAttribute(Type? ddbConverterType, [CallerMemberName] string name = default!) : this(name, ddbConverterType, DynamoDbAttributeType.Regular) + { + } + + public DynamoDbPropertyAttribute(DynamoDbAttributeType attributeType, [CallerMemberName] string name = default!) : this(name, null, attributeType) + { + } + + public DynamoDbPropertyAttribute(Type? ddbConverterType, DynamoDbAttributeType attributeType, [CallerMemberName] string name = default!) : this(name, ddbConverterType, attributeType) + { + } + public DynamoDbPropertyAttribute(string name, Type? ddbConverterType, DynamoDbAttributeType attributeType) { Name = name;