Paul Gielens:ThoughtsService

another Endpoint to my thoughts

News

Syndication

Ads


Favorites

Projects

EDM Designer Quirks

Don't be fooled with the EDM designer in SP1 beta for VS.NET 2008. Apparently there was no need "yet" for in depth customizability of the store model schema. For my class table inheritance example I'm using table prefixes since I'm running many examples on the same database. The prefix I'm using for this example is cti_ as you might have guessed. Everything works as you would expect until you try to write a linq to entities query. Instead of writing:

var query = (from f in ctx.Players
             where f.Name == "Roger"
             select f).First();

I have to write, in order to have a happy compiler, something like this:

var query = (from f in ctx.cti_Players
             where f.Name == "Roger"
             select f).First();

In order to fix this you need to hack your way into the schema files. Not really a problem as long as you don't need to do this for many entities. Designer support would be very useful though.

I encountered this weird bug that when you copy paste a project containing an EDM file to a different directory other than it was created in, it doesn't open anymore in VS.NET.

Posted: May 29 2008, 04:24 PM by p.gielens | with 3 comment(s)
Filed under: ,

Comments

FransBouma said:

I don't think it's a bug, it's simply not implemented as a feature. Against popular believe, their designer isn't that sophisticated.

Btw, why don't you use schemas inside the catalog? One schema per example?

# May 30, 2008 4:07 AM

JV said:

Isn't that a question of renaming the Entity Set Name on the class from cti_Players to Players? That'll change the propertyname of the generated objectquery property.

# May 31, 2008 6:25 PM

p.gielens said:

True JV, only the update functionality fails and you don't want to do this for many entity sets.

# July 8, 2008 2:22 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)