I am trying to use DynamoDB in Amazon AWS in my MVC.net project. And I'm also trying to execute a multi-level Business-DataAccess-Model project.
I have a GenericDataRepository class that implements the Add () function.
I am sending a T object for Add (), and I would like to convert it to an Amazon Document object, dynamically. How can I do this and what is the best?
public void Add(T entity)
{
if (entity == null)
return;
var doc = new Document();
doc["Title"] = entity.Title;
doc["Body"] = entity.Body;
doc["Author"] = entity.Author;
.....
.....
.....
}
source
share