Results 1 to 2 of 2

Thread: [RESOLVED] [.NET/Mono]LINQ: Intervention and custom filtering for optimization

  1. #1

    Thread Starter
    Fanatic Member eSPiYa's Avatar
    Join Date
    Jun 2006
    Location
    in our house
    Posts
    751

    Resolved [RESOLVED] [.NET/Mono]LINQ: Intervention and custom filtering for optimization

    I'm currently on the planning stage for my next project; Activerecord with LINQ support. Similar to "LINQ to SQL" and DBLinq but with a different approach.

    What I need is several optimization with LINQ.

    Fore example, I have a class/table 'Person'/'Persons':
    Code:
    [Table(Name="Persons")]
    public class Person
    {
    [Field(DataType=VarChar, Size=50)] public string Name; [Field] public int Age;
    }
    and execute this LINQ statement(assuming that 'Persons' a collection records from the table 'Persons' in the database):
    Code:
    var recPersons = from tPersons in Persons
    where tPersons.Age == 18
    select tPersons;
    Its natural behavior would be, it will fetch all the records from the database then filter it on the application side.

    What I want is the filter set on the LINQ statement will be pass immediately as filter with the internal SQL statement.

    Is there a way to intervene with the process and fetch the filters?

    Thanks for any help.
    Last edited by eSPiYa; Apr 16th, 2010 at 12:24 AM.

  2. #2

    Thread Starter
    Fanatic Member eSPiYa's Avatar
    Join Date
    Jun 2006
    Location
    in our house
    Posts
    751

    Re: [.NET/Mono]LINQ: Intervention and custom filtering for optimization

    I think I found what I need. It is the LINQ Provider.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width