ria-services

Ria Service Generated Code Not Accessible in Silverlight Code

I have the following Ria Service define: namespace SilverlightTest.Web { [EnableClientAccess()] public class ContactService : LinqToEntitiesDomainService<AdventureWorksEntities> { public IQueryable<Contact> GetContactSearch(string lastName) { ContactRepository rep = new ContactRepository(); ...

DomainDataSource - filtering on the client

What is the best way to filter a DomainDataSource(DDS) on the client? My DDS connects to the WCF Ria Service and downloads a number of items. I want to show bits of this information in different controls. eg a few ItemsControls showing items from the DDS filtered by various values. I know I could create a new DDS for each control and fi...

Reclaiming the space from the DescriptionViewer part of the DataFields on a Silverlight Toolkit DataForm

The DescriptionViewer part of the DataField is used to display the Description property of the System.ComponentModel.DisplayAttribute as a ToolTip in the generated form. I don't want to use this capability and although I can make sure the UI element is not visible by using a style to set either the DescriptionViewerVisibility to Collapse...

Linq Containsfunction problem

I use Ria Service domainservice for data query. In My database, there is a table People with firstname, lastname. Then I use EF/RIA services for data processing. Then I create a Filter ViewModel to capture user inputs, based it the input, I construct a linq Query to access data. At server side, the default DomainService query for pe...

Automatically have a viewmodel update the domain context and submit changes (Silverlight/RIA Services Nov beta)

I am really stuck trying to implement RIA Services with MVVM and a crud datagrid. I think i'm missing some key idea. All of the examples I have seen use a submit button or similar to send the data back to the client. I'd rather submit as soon as a row is added/deleted/modified. I thought of a couple of approaches: Have my IEnuerable It...

Can you use the Entity Framework directly from Silverlight?

Every example I see of data access in Silverlight seems to be using the RIA Services to get hold of the entities from the back end. Is it possible to use the Entity Framework directly from Silverlight or is that impossible and hence the need to use RIA Services instead? It would seem that using the Entity Framework directly from Silverl...

Can you add security to an entity Property with RIA Services?

RIA services allows you to add an attribute to a domain service method like: RequiresRole("Admin"). This will automatically check if the user calling that method has the correct security to do so. I would like to do something similar for a property on an entity. For example, only users in the role "Manager" are allowed to change the "...

How to write sum calculation based on ria service?

When using ria service for SL app, I can issue following async call to get a group of entity list. LoadOperation<Person> ch = this.AMSContext.Load(this.AMSContext.GetPersonQuery().Where(a => a.PersonID == this.performer.PersonID)); But I want to get some calculation, for example, sum(Commission), sum(Salary), the result is not entity...

How to create a dynamic linq query for filter based on ria service?

Suppose I have a table Person(PersonID, Name, ....). Then I use EF to create a Entity model and then create DomainService based on Ria Service. At client side(sliverlight), I try to create a dynamic linq for filter function. What I did is: q = EntityQuery<MyData.Person> q = q.Where(p=> p.Name.Contains(NameVar)); That is fine. Then I h...

Silverlight, RIA Services, MVC2P2 = No Data

I am having trouble upgrading my current project to use RIA Services. I added all the necessary web.config changes but still no luck. I everything compiles fine but when I hit the page using the datacontext I get an error. I debugged with fiddler and I'm getting a 404 on one of the request. I am getting back headers in my grid so some co...

Managing silverlight RIA services context lifetime

Hi, I'm working on a line-of-business silverlight application and I need a piece of advice concerning managing RIA services context lifetime. Application - afer a few simplifications - is build of one big tab control. At the beginning there are 2 tabs: customer list and invoice list. These are plain datagrids with filtering/sorting and ...

RIA Services Server Side Exception Handling

I am trying to find out a way to handle unhandled exceptions at server side. I want control over exception handling at Domain Service level so that when any operation is called then I can log the exception and wrap it in some beautiful words to send it to the client. I found many ways for WCF and classic web services but nothing for RIA...

Configuring the timeout for a WCF RIA Services call from a Silverlight 3 client

I'm using the WCF RIA Services Beta with Silverlight 3.0 and I want to be able to configure the timeout from the client. I know that the underlying technology is WCF and the default timeout seems to be 60 seconds as I would expect. Is there an easy way to control this and other WCF settings? My first thought is to try the DomainContex...

Controlling metadata generation for multiple associations between the same tables in RIA Services

I am using .NET's RIA services/LinqToSql to expose my data to a Silverlight 3 client. In the database, an Item table has more than one association to another table, User. As an example, the Item table has both CreatedByUser and ModifiedByUser fields. When I use the RIA services wizard to create my DomainService (and metadata), I find ...

Silverlight + RIA Services and customing the user/password storage

Using the Silverlight Business Application template in VS2010 creates a nice default solution with a Silverlight project and an ASP.NET project. It also automatically provides some nice authentication that seems to store usernames/password/etc for newly registered users into your local SQL Server database. Is it possible to customize th...

Entity Framework ObjectContext in windows/WPF/Silverlight application

We are writing a WPF application using Entity framework (Silverlight with RIA services to be precise). We're using a shared ObjectContext through the application so that we can benefit from sharing data across the modules. The problem is - if user during his work opens let's say historical sales, it gets loaded to the ObjectContext and ...

WCF RIA Services - Returning Entity from Invoke Operation

I was happily using RIA Services JULY 09 version and using a ServiceOperation for a method which takes some parameters and returns Entity. [ServiceOperation] public Entity TestMethod(string param1, string param2, bool param3) { // do something here } But as soon as i UPGRADED to WCF RIA services, I had to change [ServiceOperat...

WCF RIA Services - Passing a custom object to a query method as parameter

Hi I want to pass a custom class as parameter to the query method which returns me a collection of entities. I need something like this [Query] public IEnumerable Search(SearchParams params) { //do something here } public class SearchParams { public string FilterParam1 {get; set;} public string FilterParam2 {get; set;} public...

.NET RIA Services - work with custom data layer

There is a web-application that works with Business Logic Layer (BLL). The BLL gets data from the Data Access Layer (DAL). The DAL gets data from DB through and does custom mapping. At the moment it is required to add into the web application some functionality that will be Silverlight-based. It is planned to use .NET RIA Services for t...

.NET RIA Services - DataService problem

I downloaded an example of the application based on the .NET RIA services from the article: http://blogs.msdn.com/brada/archive/2009/07/22/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-part-6-poco-and-authentication-provider.aspx from the "download the full demo files" link. On my PC (MS VS 2008, SP1, NET ...