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)