I don't have much experience on the web services / database abstraction layer side of things for Silverlight, and am caught on an aspect of my porting effort. There was a core C# developer on the project that is no longer involved, and I'm working with code that he wrote.
I'm updating code on a SL3 project with the RIA Services preview ...
I have been using Shawn Wildermuths example and it has been working fine no problems at all. Today, however, I have added a few of my own Models and ViewModels and it still works. Problem appears when I start to add the attribute [RequiresAuthentication] into my DomainService. Although the code has exception handling, it prefers to cr...
Hello,
I have strange situation I have simple project to test RIA functionality in Silverlight 4.0.
When I use data source for Domain Service it works great but when I want to access Context from code and execute simple query I returns 0 rows.
//test One with query provided to DataSource
var q = ctx.GetDoctorsWithPatientsAndHospitalQu...
my context: Entity Framework 4.0 + WCF Ria Data Service + Silverlight 4.
Suppose I have entity People from EF, then I created PeopleVM like:
public class PeopleViewModel : ViewModelBase
{
public PeopleViewModel(){
//....
this._hasChanges = MyDomainContext.HasChanges;
}
private People _Peopl...
I am using Silverlight 4 and RIA services. I have a class called Request and it contains properties some of which are objects. The objects of the main class are not being created in the metadata class on the Silverlight client. I have already included the [Include] attribute over the objects on the server side. What am I doing wrong? ...
Lets say I have some code like:
ExampleDomainContext ctx = new ExampleDomainContext();
var query = from p in ctx.GetPeopleQuery()
where p.Id > 2
select p;
ctx.Load<Person>(query).Completed += (s, e) =>
{
// do some stuff
};
This is being done on the client, and the GetPeopleQuery() call from the RIA servi...
I am using SL 4, WCF RIA Services against Entity Framework 4.0. I have an Entity, Visit, that has a string Status field. I have a search screen where I need to display results that have StatusA or StatusB. I am struggling to find a way to specify a client-side query that specifies a collection of statuses that should be matched. If I was...
Hello all,
Please excuse this novice question, but I'm ramping up on Silverlight and MVVM Light. I created a view called MyView.xaml and a corresponding MyViewModel.cs.
MyView.xaml
<navigation:Page x:Class="Dashboard.Views.MyView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://sch...
I am attempting to add smart exception handling to a Silverlight 4 RIA application that is primarily consumed out-of-browser.
My goal is to display a meaningful error window if RIA services are not currently accessible (e.g. The server is down for maintenance)
Is there any facility built into RIA/SL for this task?
...
I have an abstract Content entity in my EF4 model with a concrete subclass, MultipleChoiceItem. There is a related table in the case of MultipleChoiceItem accessed by a Navigation property on the MultipleChoiceItem entity called Options. I would like to eager-load the Options result because if you're getting a MultipleChoiceItem, you alw...
I have a form with some validations set in entity metadata class. and then binding entity instance to UI by VM. Something as below:
Xaml like:
<Grid x:Name="LayoutRoot">
<StackPanel VerticalAlignment="Top">
<input:ValidationSummary />
</StackPanel>
<TextBox Text="{Binding Name, Mode=TwoW...
I tried to load a entity by domainservice(async) in on line of code like:
context.Load<Book>(
context.Books.Where(b => b.BookID == 1),
(s, e) =>
{
_book = e.Results;
},
null);
But I got following error:
The type 'SilverlightApplication1.Book' cannot be used as type parameter 'TEntity' in the generic type or method 'System.Service...
My problem is that when I add a new entity with a required field, the entity doesn't show the validation error in the UI. I'm using using EF CTP4 Code First. My setup :
I have an entity.
public class Category
{
[Key]
public int Id { get; set; }
[Required]
public string Name { get; set; }
public string ImageUrl ...
Hi guys,
Assume we have two groups "Admins" and "Users". Admins are able to use any operation available in the service but the users can only use some of them.
Should I add the "Admins" group to every single operation or if I just write it on top of the class will do the trick?
Thanks.
...
I am using the Required attribute on via the WCF RIA Services Metadata class, with the Entity Framework underneath that.
I create a new entity, and let the view bind to the view model. User looks at it for awhile, clicks around, and then attempts to save it.
The scenario here is that the user did not tab or click into a fields with a ...
I have come to a cross roads and can't figure out the proper way to get lots of data for a form onto a Silverlight / WCF RIA Services application. Imagine an order form that you can update fields about the order (Billing information, etc.) and also other information that is read-only, payments to the order, order items, etc.
The data...
Suppose I have VM with some entities as property. Say People, Addres, Phone, ....
Then I want to implelemt IEditableObject on VM so that user have undo functionnality.
What's the best way to implement request?
Demo code please.
...
I get this using SL 4 and RIA Services trying to save images to SQL Server using the Entity framework. The first few SubmitChanges() works then it fails with the above.
Using fiddler I get the following:
System.ServiceModel.CommunicationException: Unrecognized message version.
at System.ServiceModel.Channels.ReceivedMessage.ReadStart...
I have a User class that implemented the IUser interface and is used in the AuthenticationService of my WCF RIA app.
Whenever I apply the RequiresRole attribute to one of my operations I get Access to the operation is denied error even though WebContext.User.IsInRole("Managers") on the client side returns true.
Does anyone know why I g...
Testing on local Web Development Server and running the application in shared hosting environment differs a lot.
What are the best steps to deploy a Silverlight RIA Services Application on a shared hosting environment?
...