.net-ria-services

.NET RIA Services: "Associated Metadata contains the following unknown properties or fields"

So i have been playing around with the .NET RIA Services with Silverlight, and i created a new DomainService based on a couple entities from a LINQ2SQL DataContext. When i tried to compile, i got this error: Error 2 The entity 'Data.Service' does not have a key defined. Entities exposed by DomainService operations must have must ha...

C# Silverlight RIA Services - Context.Load() does not support loading of multiple queries?!?!

The Scenario Currently I have a c# silverlight business application. The application is hosted in Asp.net using the ADO.Net entity framework and a domain service class to read/write to/from my sql server database. The Setup Client UI In my silverlight client interface I have an autocomplete box which uses a query to get a list of ite...

How does the .Net RIA Services keep track of the logged in user?

I have been reading up on the .Net RIA Services that Microsoft is developing for use between Asp.Net and Silverlight applications, and it looks quite nice. I am curious about how it handles keeping track of authentication: How does the Silverlight client keep track of who is logged in, and when they have timed out? And it shouldn't ke...

How to debug incompatibility between .NET RIA Servces (July Preview) and Silverlight MVVM toolkit?

I have discovered that when I install .NET RIA Services (July preview) it breaks all of my projects that were created with Michael Sync's Silverlight MVVM toolkit. This MVVM toolkit includes a Visual Studio project template which is now failing to build. Here is the message I get: The project file "..\SilverlightModelViewApplication.W...

RIA Services and Linq2Sql

I have a Product object with a property that is a collection of type Workflows. In my "GetProducts" method on the domaincontext object I have set a breakpoint at the return statement to see if the workflows collection is filled. It is. On the client side I check Context.Products[0].Workflows in another breakpoint and I see 0 results. ...

ADO.Net Data Service Operation: Array of integers as a parameter

This question is a bit of a two parter for .Net data services. This is the function signature I'm trying to achieve: /// <summary> /// Returns Descriptions for any asset in the given assetIDs. /// </summary> [WebGet] public IQueryable<Description> FindDescriptionForAssets(int[] assetIDs); I'm trying to create a custom service operat...

RIAServices unsupported types on hand-built DomainService

My EF model was generated from my SQL Server database. I then generated a DomainService for RIAServices against the EF model. One of the entities is called "EntryCategories". The DomainService created this method: public IQueryable<EntryCategories> GetEntryCategoriesSet() { return this.Context.EntryCategoriesSet; } Since my user i...

RIA Services: What about a 2D shape known only at runtime?

Only at runtime do I know what to display in my Silverlight Grid control. The control will pull from a RIA Services DomainServices source. In the middle tier, I have to transform an EF database source into a shape consumable by the Grid but also made up of types that RIA Services support. Only at that point do I know how many columns and...

How to return ArrayList type from DomainService Class to CLient Side?

Hello, Background: 3-4 weeks experience in Silverlight3/C#/.Net and about 3days worth with the RIA Services concept. (most of my previous questions up to date should explain why) I am doing a test implementation of Microsoft's RIA services with Silverlight3. This is part of a proof of concept i have to do for a client. So its very basi...

.Net RIA Services and SubSonic3 usage examples

I am looking for any examples which ideally cover several possible combinations ( SimpleRepository, ActiveRecord , POCO ) - something similar to Brad Abrams http://blogs.msdn.com/brada/archive/2009/10/27/index-for-business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update.aspx but ORM is SubSonic. ...

Where clause on a domain service call

I have a problem when using LINQ to set a where clause on a query in a domain service call. If I don't set a where clause it works just fine and I get my result back in my completed event (I have only implemented the eventhandler for the completed event to demonstrate my issue here). LoadOperation<User> load = _Context.Load(_Context...

Using Silverlight.FX Window for MVVM as a Silverlight 3.0 Page?

I'm creating a Silverlight 3.0 MVVM application using Silverlight.FX but my View is actually using the Silverlight navigation system, a Page. Following Nikhil's example, my View should derive from the Silverlight.FX Window class. What's the best approach to making a Window that also supports the Page functionality or is there something ...

.Net Ria Services Deployment

I am having difficulty deploying RIA services/Silverlight 3 to a staging environment. Here is my situation: 1) I am using RIA for authentication. This works fine on both my development machine and in the staging environment. 2) I created a custom LinqToEntities RIA service to get data from the database into my application. This servi...

How to pass dynamic search parameters from client through RIA Services?

Hi, I have a C#.NET Silverlight 3.0 client running RIA Services with an EF model. I'm trying to set up an advanced search system on the client such that the user can say, I want field (property) "Foo1" to have value "Bar1," etc.. . I'd like to use a flexible, dynamic approach similar to this one. The problem is I can't pass IQueryable ...

Retrieval of Single Entity + Ria Services

Hi there, I am reading and doing some RnD on RIA as a solution for a new Silverlight project. I have read alot of the documentation and decided to do a small mockup of a system using .Net RIA Services. I want to know how to get a Single Entity from the Domain Service? example: I want to get a person and populate a form: public Pers...

How to read Metadata values from Silverlight Client with RIA Services

I have an RIA Services Silverlight 3.0 app using an EF model. In the model metadata I've included several Display Name properties that I'd like to use when referring to the model on the client-side (in TextBoxes, etc.. .) I'm using reflection now to get the properties of the model on the client so that if the model changes over time, I ...

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...

Using with RIA and WCF without RIA, which one is suggested ?

what is the advantages/disadvantages of using RIA against WCF without RIA? ...

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...