I am trying to add to the authentication system provided in the Silverlight 4 business template as my model does not completely fit that provided in the template. I have an existing web service that performs my authentication and provides roles and also permitted operations for each role. This is the model provided by AzMan/Authenticatio...
I have used the SL business application template and added a new blank, empty domain service in my Services folder on the .Web part of the solution. The class is DomainService1 and inherits from DomainService. It contains one method:
public class DomainService1 : DomainService
{
public string Hello()
{
return "Hello Worl...
In EF 4, the default ObjectSet is available for each entity. For example, I have table Employee, after gererated Entity Model, EF will create ObjectSet on Employee.
Then when using wcf ria service, the default query will be like:
public IQueryable GetEmployee()
{
return this.ObjectContext.Employees;
}
With objectSet, I...
Call SP in EF 4.0 in following code:
public IQueryable<Employee> GetEmployeesByFollowup()
{
var results = from p in this.ObjectContext.SearchEmployeeFollowup()
select p;
foreach (Employee p in results)
{
p.DepaermentReference.Load();
...
I've got a DomainService that I've created from an entity framework that's being exposed via a JSON endpoint. I can successfully do GET operations but whenever I try to POST to them using JSON the objects are always null.
The code below is used to create a user record in my database:
[Invoke]
public void CreateUser(User NewUser)
...
Hello,
I'm trying to use RIA services, I installed Silverlight 4 and Silverlight 4 Tools/SDK, but I cannot setup a LINQToEntitiesDomainService because I can't find this namespace/assembly: System.ServiceModel.DomainServices.EntityFramework. Where does this assembly come from, not sure why it's missing? Is that an add-on I'm missing?
...
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 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...
I got this DomainService method I'm calling from my SL ViewModel using the Invoke attribute:
[Invoke]
public ServiceModel.Recipy GetRecipyById(int recipyId)
{
return new Recipy
{
RecipyId = 1,
Name = "test",
Description = "desc",
Author =...
Hi - I'd like to get some help on how to formulate this query:
I Have a snapshot of the datamodel relevant to this question at: http://jdsign.dk/media/9221/dbdiagram.png
To the method that should be created the input is a guid userid in the following called inputuserid.
Please help me get:
a list of all the subjects that have any note...
Following an introductory tutorial for the new DomainService in Silverlight 4 RIA, I got an unexpected exception. When I perform an update the property EntitiesInError[index].EntityConflict.PropertyNames throws the following exception:
InvalidOperationException: PropertyNames are not available for delete conflicts.
Service method execu...
I have a domain service, derived from LinqToEntitiesDomainService<FOOEntities>
It has one method, IQueryable<Bar> GetBar(). GetBar returns a LINQ query on the entity model. The LINQ works fine in LINQPad.
In the XAML of a Silverlight thingy, I have a ListBox whose ItemsSource points to a DomainDataSource defined in the same XAML file,...
When I try to use these two features together, I get a compilation error on my model (note, I've renamed the entity for my _CT table "ContentHistory" and my SL4 Unit Test project is called "DomainServices.UnitTest":
Error 39 Property 'DomainServices.Web.ContentHistory.C___seqval' is marked as a key
property and is of Type 'System.Byte[]...
I need to pass a set of values to a DomainService method. Here's what I'd like the service method to look like:
IQueryable<Person> GetPeople( Nullable<DateTime> MinDOB, IList<String> Ethnicities )
{
return
from
Person item in ObjectContext.People
where
item.DOB >= MinDOB
&& Ethnic...
In my authentication service, I would like to call methods (query or invoke) on my User service to validate credentials. So, for example:
protected override AuthUser ValidateCredentials(string name, string password,
string customData, out string userData)
{
AuthUser user = null;
userData = null;
...
I am using a DomainService with .NET4, EF4. It is working from my local SQL Server, when I change the connection string to the remote SQL server which has the same schema and data in it, shallow queries run normally.
When a query which contains .Include("child_table_name") in the ObjectQuery and [IncludeAttribute] on the entity property...
I am relatively new to the Silverlight experience and am trying to create a MVVM app with a DomainService that returns POCOs as the models. I have a UserControl that has a TreeView with the ItemsSource set to bind to an ObservableCollection of a type that has an ObservableCollection as one of it's properties, and that collection is of a ...
Hi,
I have the code below which is basically calling a Domain Service in a SilverLight Application.
LoadOperation<tCity> loadOperation = _dataContext.Load(query,callBack, true);
Can you tell me which operation is done first?
Is the callBack method called before loadOperation variable is assigned or after it is assigned?
Thanks
...
I'm looking for a solution to a problem I've encountered using RIA and XSD.
The main problem is that the XSD schema generates a Hierarchical entity type with no relations to its children ( because the relationship is implicit from XML) the problem that I've encountered is that RIA handles Relational Entity objects and there is no way to...
Currently I have a DomainService that gets lists of MainBusinessLines, Groups, and LOBs. It then loops and adds the Groups to the appropriate MainBusinessLine, and adds the LOBs to the appropriate Group. I have stepped through and confirmed that the collections are correct. But the issue is when the LoadOperation of the DomainContext loa...