Hello,
I am working on a solution using odataservice implementing linq to entity.
there is a table named worksite. It has basic informstion as name, address, etc..
There is a separate table named location. It has four level of hierarchy. e.g onshore/ offshore is the parent. then it had child as area, then region and finally field.
We are saving location Id as foreign key in worksite table. We need to enable filtering on all four fields of location but the only data saved in worksite is location id and from that we can track parent and go to the fourth level.
first query is : Is there a simple way to filter on Location name for which id is saved. by default datafield is set to Location Id so filtering is enabled on id which is number not on name.
second query : How can we implement filtering on other fields i.e. Location.Parent.Name, Location.Parent.Parent.Name, etc... which are not saved anywhere but evaluated at run time from value of location id.
I am working on a solution using odataservice implementing linq to entity.
there is a table named worksite. It has basic informstion as name, address, etc..
There is a separate table named location. It has four level of hierarchy. e.g onshore/ offshore is the parent. then it had child as area, then region and finally field.
We are saving location Id as foreign key in worksite table. We need to enable filtering on all four fields of location but the only data saved in worksite is location id and from that we can track parent and go to the fourth level.
first query is : Is there a simple way to filter on Location name for which id is saved. by default datafield is set to Location Id so filtering is enabled on id which is number not on name.
second query : How can we implement filtering on other fields i.e. Location.Parent.Name, Location.Parent.Parent.Name, etc... which are not saved anywhere but evaluated at run time from value of location id.