Advanced filter in OpenAccessLinqDataSource possible?

2 posts, 0 answers
  1. Stepan
    Stepan avatar
    11 posts
    Member since:
    Mar 2011

    Posted 10 Feb 2012 Link to this post

    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?
  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 13 Feb 2012 Link to this post

    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 >>
  3. DevCraft banner
Back to Top