I am using the following function in the Domain Service,
public IQueryable<Dictionary<discussion_category, List<discussion_board>>> GetDiscussion_categoriesWithBoards()
{
return new[] {
GetDiscussion_categories().Select(c => new {
Category = c,
Boards = GetDiscussion_boardsByCa开发者_开发知识库tegory(c.ID).ToList()
}).ToDictionary(i => i.Category, i => i.Boards.ToList())
}.AsQueryable();
}
seems to have no errors and i get the following error while compiling,
Type 'Dictionary`2' is not a valid entity type. Entity types cannot be generic.
what could be the problem?
The type Dictionary<discussion_category, List<discussion_board>>
is not a valid type to send over Ria services, unfortunately you can only send IQueryable<Entity>
(As far as I can remember)
If you want to send something else, you might want to have a look at the InvokeOperation and creating Complex Types (see Complex types in this blog).
精彩评论