I'm trying to create my first DomainDataSource and have followed the steps in the video at:
However, I am uncertain where I get the name for the source of my DomainContext.
The example uses the TestDomainServices.CS and in the code of the application it uses
So I created a NorthDomainService.CS and used:
But I get the following error message:
Error 1 The type 'service:NorthDomainContext' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
What am I missing or where do I get the correct data for the <source:.../>
8 Answers, 1 is accepted
Do you get this with both standard DomainDataSource and RadDomainDataSource or this is just related to RadDomainDataSource?Kind regards,
the Telerik team
Thanks for the reply. I am only trying it with the RadDomainDataSouce. Is it possible that I'm missing a reference?
You need to add a xml namespace for the generated classes, i.e. the domain context. You should find your generated domain context class and see under what namespace it is. This namespace should be included on your page so that the domain context can be found.
I have attached a sample project for reference. You can examine it to see how to do this. Greetings,
the Telerik team
I'm getting closer and am able to load and run the sample you sent but I seem to be off when I try it.
It still says:
Error 1 Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'Hotel.Web.Services' that is not included in the assembly.
Error 2 The type 'e:phaDomainContext' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
And I included
in the header of the mainpage.xaml and my .cs file is in the Services folder.
I've attached a screen capture to show the file structure of the documents. Any help is appreciated!
When you rebuild the entire solution you will get a folder with generated code in the client project. Click the icon to see all hidden items in the client project. You should see a folder containing the generated code. Go there and see what is the name of your DomainContext and the namespace.
Please, read this tutorial very carefully and follow its steps exactly. If you follow this tutorial exactly -- you will have your domain context without any problems.
By the way, it would be better if you post these kinds of questions on the WCF RIA Services forums, since they are not related to Telerik controls in any way. Telerik does not develop and support WCF RIA Services or Visual Studio, so you should contact the appropriate parties when you have problems with these technologies/products.
I hope this makes sense. Thank you for your understanding.
the Telerik team
I got it! Thanks so much for responding when it wasn't a Telerik issue that I was learning.
As you can tell, I'm not a full-time programmer and Telerik really opens up a lot of opportunities for people like me. Thanks for developing a great program and providing the learning resources.
I have a problem with RadDomainDataSource.DomainContext. My DomainContext works well with
DomainDataSource, but when i use it in the RadDomainDataSource i will retrive a error like this: "Can not create an instance of RadDomainDataSource" Do you have any idea for this ?