I am very new to dynamodb. I follow the http://www.rkconsulting.com/blog/persistence-model-framework-with-aws-dynamodb walkthrough for connecting and CRUD operations in dynamodb, and it works great.
In this tutorial, they use attribute mapping for map class properties.
[DynamoDBTable("Dinosaur")] public class Dinosaur { [DynamoDBHashKey] public string Id { get; set; } [DynamoDBProperty(AttributeName = "Name")] public string Name { get; set; } [DynamoDBProperty(AttributeName = "HeightMetres")] public double HeightMetres { get; set; } [DynamoDBProperty(AttributeName = "WeightKG")] public double WeightKg { get; set; } [DynamoDBProperty(AttributeName = "Age")] public int Age { get; set; } [DynamoDBProperty(AttributeName = "Characteristics")] public List<string> Characteristics { get; set; } [DynamoDBProperty(AttributeName = "Photo", Converter = typeof(ImageConverter))] public Image Photo { get; set; } [DynamoDBIgnore] public int IgnoreMe { get; set; } }
My question is, how can I match class properties without using an attribute?
like mongoDb
public class Employee { [BsonRepresentation(BsonType.ObjectId)] public string Id { get; set; } }
we can write it this way in a separate class
BsonClassMap.RegisterClassMap<Employee>(cm => { cm.AutoMap(); cm.IdMemberMap.SetRepresentation(BsonType.ObjectId); });
Is this possible in dynamodb?
, " " .
, - , POC Dynamo. api (AWSSDK.DynamoDBv2) AmazonDynamoDBClient, API, DynamoDBConext - IDynamoDBContext, " " . , .
AmazonDynamoDBClient
DynamoDBConext
IDynamoDBContext
: https://github.com/aws/aws-sdk-net/issues
.NET SDK , / . [DynamoDBProperty (...)], , DynamoDB - , .NET.
, , ( , AttributeName) WeightKg ( ), .
, , , , ( ), 3.3.0.0 SDK, . , , , , ...