Skip to main content
Home Forums Silverlight Programming WCF RIA Services Add New Domain Service Class - Avail DataContext/ObjectContexts now empty?
5 replies. Latest Post by Helen W on November 21, 2009.
(0)
XMLViking
Member
5 points
23 Posts
11-06-2009 5:20 PM |
So I'm working away struggling with the Entity Framework designer etc...long story.
Eventually I get my edmx model to compile correctly after saving it...and i'm happy.
I go to add a new item -> Domain Service Class -> Wizard "Add New Domain Service Class"
Select my appropriate defined connection (Entity Framework) and nothing...
All of my context objects are gone. If I select any other connection (Entity Framework) they are missing now as well.
I have tried to restart/reboot the app..remove my *user" files etc...remove the contents of the obj and debug etc....Nothing.
Is my wizard broke now? Add and remove RIA service again?
Any thoughts?
Thanks!
Ardman
Contributor
3264 points
906 Posts
11-07-2009 5:50 AM |
One thing that I had trouble with when I first created my Domain Service was that I didn't rebuild my project. So, I added a Domain Service and got nothing. I rebuilt the project and then added a new Domain Service and viola, I got my tables. Not sure if you've tried this.
11-09-2009 11:35 AM |
Thank you for the response :)
Unfortuantely that is not it. I have a pretty strick regimate of things I do now to baby the edmx files. I save every keystroke just about and close and build with every new entity.
The problem is the number of entities. The magic number is 13 I think. I will verifiy this. What I am seeing is that if use less then 13 enties the Ria Services "Add a Domain Service Class" works fine. But when I get to the 13th it seems to fall over. I removed the new 13 entity edmx and add a new it works....remove it add it again 13 it breaks.
The larger size of the entity model is due to some lookup tables. Virtualized tables "table of tables" for lookups does not work well nor will views get me there.
I will follow up with some error logs etc..if I get any. The problem is that there is no error...the context/objects are just empty.
Thanks
11-09-2009 6:28 PM |
Figured it out:
NEVER...NEVER save your edmx file prior to buiding.
My problem was I was being to deligent with changes and saving prior to buiding. The act of saving the edmx file corrupts the freshly crafted edmx. Corruption maybe a strong word. I think it more or less renders the meta data associated with the edmx unusable or something.
So lesson learned. DO NOT SAVE prior to buidling the server or web side of the ria services project. After wich you can add your new domain services class and whola! Your new 50+ data context objects, if so desired, will show up for you. :)
Helen W
150 points
85 Posts
11-21-2009 2:34 PM |
I am having exactly the same problem -- over and over and over.
So, are you saying that once I (foolishly) save my edmx file, I have to delete it and add it again, then build the solution without saving it, before it will show up in the datacontext?
Words cannot express how much time I have wasted with this.
11-21-2009 2:41 PM |
XMLViking: Figured it out: NEVER...NEVER save your edmx file prior to buiding. My problem was I was being to deligent with changes and saving prior to buiding. The act of saving the edmx file corrupts the freshly crafted edmx. Corruption maybe a strong word. I think it more or less renders the meta data associated with the edmx unusable or something. So lesson learned. DO NOT SAVE prior to buidling the server or web side of the ria services project. After wich you can add your new domain services class and whola! Your new 50+ data context objects, if so desired, will show up for you. :) Thanks!
Thank you, thank you, thank you! From now on I will not even close the edmx file before I add my domain service class!