This is a migrated thread and some comments may be shown as answers.
Advanced filter in OpenAccessLinqDataSource possible?
1 Answer 52 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stepan
Top achievements
Rank 1
Stepan asked on 10 Feb 2012, 09:13 AM
Hi!
We are reviewing the capabilities of OpenAccessLinqDataSource, in particular its filtering functionality.
Having read this page
http://www.telerik.com/help/openaccess-orm/developer-guide-oalinqdatasource-filter-records.html

we want to learn how flexible the filter expressions could be.

The questions:
1) Is it possible to set up filtering with LIKE predicate? Something like:

  <entity_property>  contains @text_param

For example, in Oracle SQL we could use:
  tableA.columnB LIKE '%'|| :text_param ||'%'

 What is the syntax in OpenAccessLinqDataSource designer?

2) Which properties/events can be pulled in to change filter expressions in run time?

1 Answer, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 13 Feb 2012, 06:40 PM

Hi,

Actually you could perform full-text search using OpenAccess ORM with a bit of SQL:
var query = from p in context.ProductName where "FREETEXT ({0},{1})".SQL<bool>(p.ProductName, 'spread') select p;

The following help article demonstrates how to change the filter expression of the OpenAccessLinqDataSource runtime.
Hope that helps.

Kind regards,
Damyan Bogoev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Stepan
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Share this question
or