iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Should the querdescriptor work if we drill down through the navigation properties. For example:
I have a schemawith a many to many relationship.
EMPLOYEE-TABLE CLIENT-TABLE
EmployeeID *----* ClientID
FullName ClientName
So the Employee Entity should be:
_____________
| EmployeeID |
| FullName |
|----------|
| Clients |
I should be able to write a query (Assuming intersoft style viewmodels for a grid) as such:
QueryDescriptor qd = _employeeViewModel.QueryDescriptor; CompositeFilterDescriptorCollection employeeFilter = new CompositeFilterDescriptorCollection(); employeeFilter.LogicalOperator = FilterCompositionLogicalOperator.Or; employeeFilter.Add( new FilterDescriptor() { PropertyName = "Clients.ClientID", Operator = FilterOperator.IsEqualTo, Value = 1 } ); qd.FilterDescriptors.LogicalOperator = FilterCompositionLogicalOperator.Or; qd.FilterDescriptors.Add(employeeFilter); It does not work and gives me a null reference exception. I am assuming it is because of the dependancy property being across a navigation property of the entity. Is there a way to accoplish this type of query. Right now I have to avaid using the query descriptor and accoplish this in the repository with a getdata method that accepts the ID to pass to linq.
QueryDescriptor qd = _employeeViewModel.QueryDescriptor;
CompositeFilterDescriptorCollection employeeFilter = new CompositeFilterDescriptorCollection();
employeeFilter.LogicalOperator = FilterCompositionLogicalOperator.Or;
employeeFilter.Add( new FilterDescriptor() { PropertyName = "Clients.ClientID", Operator = FilterOperator.IsEqualTo, Value = 1 } ); qd.FilterDescriptors.LogicalOperator = FilterCompositionLogicalOperator.Or; qd.FilterDescriptors.Add(employeeFilter); It does not work and gives me a null reference exception. I am assuming it is because of the dependancy property being across a navigation property of the entity. Is there a way to accoplish this type of query. Right now I have to avaid using the query descriptor and accoplish this in the repository with a getdata method that accepts the ID to pass to linq.
employeeFilter.Add( new FilterDescriptor() { PropertyName = "Clients.ClientID", Operator = FilterOperator.IsEqualTo, Value = 1 } );
qd.FilterDescriptors.LogicalOperator = FilterCompositionLogicalOperator.Or; qd.FilterDescriptors.Add(employeeFilter); It does not work and gives me a null reference exception. I am assuming it is because of the dependancy property being across a navigation property of the entity. Is there a way to accoplish this type of query. Right now I have to avaid using the query descriptor and accoplish this in the repository with a getdata method that accepts the ID to pass to linq.
qd.FilterDescriptors.LogicalOperator = FilterCompositionLogicalOperator.Or;
qd.FilterDescriptors.Add(employeeFilter); It does not work and gives me a null reference exception. I am assuming it is because of the dependancy property being across a navigation property of the entity. Is there a way to accoplish this type of query. Right now I have to avaid using the query descriptor and accoplish this in the repository with a getdata method that accepts the ID to pass to linq.
qd.FilterDescriptors.Add(employeeFilter);
It does not work and gives me a null reference exception. I am assuming it is because of the dependancy property being across a navigation property of the entity. Is there a way to accoplish this type of query. Right now I have to avaid using the query descriptor and accoplish this in the repository with a getdata method that accepts the ID to pass to linq.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname