Skip to main content

Microsoft Silverlight

Answered Question Add New Domain Service Class - Avail DataContext/ObjectContexts now empty?RSS Feed

(0)

XMLViking
XMLViking

Member

Member

5 points

23 Posts

Add New Domain Service Class - Avail DataContext/ObjectContexts now empty?

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
Ardman

Contributor

Contributor

3344 points

926 Posts

Re: Add New Domain Service Class - Avail DataContext/ObjectContexts now empty?

 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.

XMLViking
XMLViking

Member

Member

5 points

23 Posts

Re: Add New Domain Service Class - Avail DataContext/ObjectContexts now empty?

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 

XMLViking
XMLViking

Member

Member

5 points

23 Posts

Answered Question

Re: Add New Domain Service Class - Avail DataContext/ObjectContexts now empty?

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!

Helen W
Helen W

Member

Member

152 points

89 Posts

Re: Add New Domain Service Class - Avail DataContext/ObjectContexts now empty?

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.

Helen W
http://www.agile-soft.com

Helen W
Helen W

Member

Member

152 points

89 Posts

Re: Add New Domain Service Class - Avail DataContext/ObjectContexts now empty?

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!

 

 

Helen W
http://www.agile-soft.com
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities