Hello!
We already set up a silverlight project using the DataServiceDataSource. But now, we have a project in WPF, and we are trying to implement the same scenario, but in this WPF project we are using Linq to SQL (.dbml) to generate the models.
This is a short description of the project structure:
APP (Views, ViewModels) WPF Application
Core(.dbml, partial classes, business logic etc) c# class library
Service(WCF for something that the project might have) WCF
My question is, with this architecture, how do i use the DataServiceDataSource? I realy need a service exposed to use it? it would be great if you explain it a little bit.
Looking forward to a answer.
Thanks
We already set up a silverlight project using the DataServiceDataSource. But now, we have a project in WPF, and we are trying to implement the same scenario, but in this WPF project we are using Linq to SQL (.dbml) to generate the models.
This is a short description of the project structure:
APP (Views, ViewModels) WPF Application
Core(.dbml, partial classes, business logic etc) c# class library
Service(WCF for something that the project might have) WCF
My question is, with this architecture, how do i use the DataServiceDataSource? I realy need a service exposed to use it? it would be great if you explain it a little bit.
Looking forward to a answer.
Thanks
5 Answers, 1 is accepted
0
Hi,
Vlad
the Telerik team
RadDataServiceDataSource is designed to work with OData/WCF Data services. For your case I suggest you to use EF instead LinqToSql if you want direct data-base access and in this case you can use RadEntityFrameworkDataSource.
Greetings,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Oh that's good news!
I follow the documentation, and add a Entity Model, like this:
But when i start the project, i'm getting this error:
'The invocation of the constructor on type 'Telerik.Windows.Controls.RadEntityFrameworkDataSource' that matches the specified binding constraints threw an exception.'.
Am I missing something?
I follow the documentation, and add a Entity Model, like this:
<telerik:RadEntityFrameworkDataSource Name="PessoasEntityDataSource" QueryName="VW_PESSOA"> <telerik:RadEntityFrameworkDataSource.ObjectContext> <core:ITS_CARTEntities /> </telerik:RadEntityFrameworkDataSource.ObjectContext> </telerik:RadEntityFrameworkDataSource>
But when i start the project, i'm getting this error:
'The invocation of the constructor on type 'Telerik.Windows.Controls.RadEntityFrameworkDataSource' that matches the specified binding constraints threw an exception.'.
Am I missing something?
0
Hi,
Vlad
the Telerik team
Can you check the inner exception?
Regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Yes, appears that's something is wrong with the connection string, but it is defined on app.config file. Attached the inner exception
Thanks.
Thanks.
0
I've found the problem, my .edmx is in a different project, so I copy the connection string to the configuration file of the WPF project, now it works. Is this the right way? I mean, it seems to me a little bit strange define the same connection string in two projects.