-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Record Support in DynamoDBContext #3317
Comments
Per Create record types, Records are types that use value-based equality. This is opposite of class types which use reference based equality. Unsure if record types would fit into object based model. Needs review with the team. |
Is it
This seemed to work for me for
|
no i had trouble with regular [DynamoDBTable("actors", lowerCamelCaseProperties:true)]
public record ActorRole(
[property: DynamoDBHashKey("actor")] string Name,
string Movie,
string Role,
DateTime LastUpdated); |
I have a similar I attempted to define an explicit default constructor like this: [DynamoDBTable("actors")]
public record ActorRole(
[property: DynamoDBHashKey("actor")]
string? Name = null,
string? Movie = null,
string? Role = null,
DateTime? LastUpdated = null
)
{
public ActorRole() : this(null!) { }
} But no luck with that approach either. |
Describe the feature
Currently
DynamoDBContext
supports class types for the object model type parameter but does not seem to work with record types. It would be great if it would support record types as well.Use Case
Using record types with DynamoDBContext.
Proposed Solution
No response
Other Information
No response
Acknowledgements
AWS .NET SDK and/or Package version used
AWSSDK.DynamoDBv2
Targeted .NET Platform
.NET 6 and up
Operating System and version
Any
The text was updated successfully, but these errors were encountered: