I am new to NoSql concepts. Coming from a mind set of "ModelFirst" i usually design my models first. I have a model as follows.
public class Book
{
public string Name { get; set; }
[EntityPropertyConverter(typeof(Category))]
public List<Category> Categories { get; set; }
}
public class Category
{
public string Name { get; set; }
}
Student class is a complex type and
[EntityPropertyConverter]
attribute helps serialize Categories before writing to Azure Table and deserialize when reading back.
A book can belong to more than one categories. My question is if someone has to search a book by one of n number of categories, how can we do that.
Azure Table supports quires like below
TableQuery.GenerateFilterCondition("Categories", QueryComparisons.Equal, JsonConvert.SerializeObject(???))
But with this i cannot get the required result.
please do comment if my overall approach is incorrect.