EF generated DataContext does not show entities in Add Domain Service Class Wizzard

Posts   
 
    
harmen
User
Posts: 47
Joined: 22-Jun-2007
# Posted on: 10-Sep-2010 09:31:54   

Hi,

I created the database (TaskManager.sql in zipfile) that comes with the tutorial at http://www.silverlightshow.net/items/WCF-RIA-Services-Part-6-Validating-Data.aspx.

I created an llbl project (TaskManager.EF.llblgenproj) and generated EF source (in TaskManagerWithLLBLGeneratedEFModel). When I try to add a domain service class to the generated project, it does not discover the entities in the model (see AddNewDoaminServiceClassBAD(LLBL).png). Also, VS cannot open de model (edmx file) in the designer.

The model that I generated with VS (in TaskManagerWithVSGeneratedEFModel) does make the add new domain service wizzard discover the entities (see AddNewDoaminServiceClassOK(VS).png).

It would be nice if one could use the add new domain service wizzard and the VS designer with the LLBL generated code.

Harmen

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 10-Sep-2010 10:05:57   

harmen wrote:

Hi,

I created the database (TaskManager.sql in zipfile) that comes with the tutorial at http://www.silverlightshow.net/items/WCF-RIA-Services-Part-6-Validating-Data.aspx.

I created an llbl project (TaskManager.EF.llblgenproj) and generated EF source (in TaskManagerWithLLBLGeneratedEFModel). When I try to add a domain service class to the generated project, it does not discover the entities in the model (see AddNewDoaminServiceClassBAD(LLBL).png). Also, VS cannot open de model (edmx file) in the designer.

This has been mentioned before, but it's due to limitations in MS' wizard (it's only looking for an edmx which contains an entitycontainer with the same name as the context class.). See the project properties' settings for EF (second tab) to set SetContextClassNameEqualToEdmxModelContainerName to true (checked). POCO/STE entities don't work with the wizard as the wizard can't handle them.

I.o.w.: it's quite limited. The wizard is pretty bogus anyway, you can't re-run it when the model changes, so you're better of writing the service by hand.

The edmx file doesn't open in the designer because there's no visual info in the edmx file (no position data), as that's not needed for runtime usage.

The model that I generated with VS (in TaskManagerWithVSGeneratedEFModel) does make the add new domain service wizzard discover the entities (see AddNewDoaminServiceClassOK(VS).png).

It would be nice if one could use the add new domain service wizzard and the VS designer with the LLBL generated code. Harmen

If you use v1 style entities, and the setting above, you can use the wizard. It's not a smooth experience however, as the wizard is severily limited. I reported this to MS and they acknowledged this, and promised to work on a better wizard. (although with the recent news that SL might be overtaken by HTML5 inside MS, this is not certain)

Frans Bouma | Lead developer LLBLGen Pro
harmen
User
Posts: 47
Joined: 22-Jun-2007
# Posted on: 10-Sep-2010 11:50:58   

OK, thanks.

Btw, could you share your source or do you have a link to that news about SL being overtaken by HTML5 inside MS?

Edit: nevermind... http://www.theregister.co.uk/2010/09/09/microsoft_html_5/

Harmen

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 10-Sep-2010 13:20:53   

harmen wrote:

OK, thanks.

Btw, could you share your source or do you have a link to that news about SL being overtaken by HTML5 inside MS?

Edit: nevermind... http://www.theregister.co.uk/2010/09/09/microsoft_html_5/

Harmen

See: http://me.samiq.net/windows-8-html-5-and-how-silverlight-became-t (better than the register wink )

Frans Bouma | Lead developer LLBLGen Pro