Skip to content

Instantly share code, notes, and snippets.

@jpda
Created April 8, 2015 05:33
Show Gist options
  • Save jpda/ca2d1a85690d353c37ee to your computer and use it in GitHub Desktop.
Save jpda/ca2d1a85690d353c37ee to your computer and use it in GitHub Desktop.
Attribute Metadata
public class SomeEntity : TableEntity
{
[IndexMetadata("Id", IsKey = true, IsRetrievable = true, IsSearchable = true, IsSortable = true)]
public string Id
{
get { return RowKey; }
set { RowKey = value; }
}
[IndexMetadata("Title", IsKey = false, IsRetrievable = true, IsSearchable = true, IsSortable = true)]
public string Title { get; set; }
[IndexMetadata("Industry", IsKey = false, IsRetrievable = true, IsSearchable = true, IsSortable = true, IsFacetable = true)]
public string Industry { get; set; }
[IndexMetadata("OtherField", IsKey = false, IsRetrievable = true, IsSearchable = true, IsSortable = true)]
public string OtherField { get; set; }
[IndexMetadata("MoreData", IsKey = false, IsRetrievable = true, IsSearchable = true, IsFacetable = true, IsFilterable = true)]
public string MoreData { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment