Closed cohen990 closed 9 years ago
Currently, we are grabbing all stories and selecting the ones for a given author within the view itself.
Needs to be refactored to grab only the stories on interest within the store itself.
Can be done by changing the line
IEnumerable<BlogPostEntity> entities = _table.ExecuteQuery(query).Select(x => x);
to
IEnumerable<BlogPostEntity> entities = _table.ExecuteQuery(query) .Where(x => x.PartitionKey == entityPartitionKey) .Select(x => x);
This will allow us to remove some of the logic from the AuthorStories.cshtml
e.g. if (@blogPost.PartitionKey == currentAuthorUN)
if (@blogPost.PartitionKey == currentAuthorUN)
Also need to change AuthorStories.cshtml to expect a BlogModel instead of a BlogPostEntity
what this comes down to is saying, for each blog, if the author id (the blog partition key) is equal to the one we requested, then select those blogs and return them.
Currently, we are grabbing all stories and selecting the ones for a given author within the view itself.
Needs to be refactored to grab only the stories on interest within the store itself.
Can be done by changing the line
to
This will allow us to remove some of the logic from the AuthorStories.cshtml
e.g.
if (@blogPost.PartitionKey == currentAuthorUN)
Also need to change AuthorStories.cshtml to expect a BlogModel instead of a BlogPostEntity