user1106741
user1106741

Reputation: 237

WCF RIA Services; Classes not being generated on client side

I have the following code in my domainservice class:

public IQueryable<Resources> GetResources()
{
        ResourceToolDataClassesDataContext _context = new 
                                            ResourceToolDataClassesDataContext();
        return _context.Resources
                        .Where(o => (o.EndDate == null 
                               || o.EndDate >= DateTime.Now))
                        .AsQueryable();
}

However on the client side I can't seem to access the classes for any of my DataContext, it only works for my entity model. I've used this code snippet on another project and it worked fine there.. Not sure what is different here.

IF I return a single instance e.g public Resources, it works?? but not with IQueryable

Upvotes: 0

Views: 254

Answers (1)

Chui Tey
Chui Tey

Reputation: 5584

Have you defined [Key] Attribute on your Resources class?

Upvotes: 1

Related Questions