Skip to content

Instantly share code, notes, and snippets.

@melkio
Created December 4, 2012 14:17
Show Gist options
  • Save melkio/4204370 to your computer and use it in GitHub Desktop.
Save melkio/4204370 to your computer and use it in GitHub Desktop.
EntityResolver<BaseClass> resolver = (partition, row, timestamp, properties, etag) =>
{
var type = Type.GetType(properties["Type"].StringValue);
var entity = (BaseClass)Activator.CreateInstance(type);
entity.PartitionKey = partition;
entity.RowKey = row;
entity.Timestamp = timestamp;
entity.ETag = etag;
entity.ReadEntity(properties, null);
return entity;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment