incomplete MetadataWorkspace?

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
robymes
Posts: 29
Joined: Tue 09 Sep 2008 09:46

incomplete MetadataWorkspace?

Post by robymes » Thu 04 Jun 2009 21:19

Hello, I'm digging into ObjectContext.MetadataWorkspace.
everything is fine when I query the conceptual model via DataSpace.CSpace.
But I always receive an error when i query for the storage model via DataSpace.SSpace (exception says "System.InvalidOperationException: The space 'SSpace' has no associated collection").
Can you tell me something about this error?
Thanks

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 05 Jun 2009 09:07

Please post here some sample code reproducing the error.

robymes
Posts: 29
Joined: Tue 09 Sep 2008 09:46

Post by robymes » Fri 05 Jun 2009 10:20

When I want to enumerate all the types defined in the storage model I use the following query:

Code: Select all

var query = 
    from item in
    context.MetadataWorkspace.GetItems(DataSpace.SSpace)
    .Where(m => m.BuiltInTypeKind == BuiltInTypeKind.EntityType)
    select item;
I always get an exception. If I use DataSpace.CSpace (for conceptual model) the query works fine.

Thanks

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 05 Jun 2009 12:29

This is designed behaviour.
Microsoft models also do not provide items of this collection.

Post Reply