Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3358790
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:47:40+00:00 2026-05-18T02:47:40+00:00

I am trying to re-design a data access layer that was originally built using

  • 0

I am trying to re-design a data access layer that was originally built using Raptier. Raptier generats methods that accept a where clause as a parameter to be passed in to a stored proc. I really need to retain the existing mesthos signatures, so my new DAL needs to accept where clauses as well. I want to use the more up-to-date data access technologies and techniques, so was thinking about using Entity Framework from .Net 4.0.

However, it doesn’t look like I can accept dynamic where clauses without implementing some intense reoutines to parse them into lamba expressions. Is there something I’ve missed? Am I out of luck with Entity Framework?

Thanks,
Marc

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:47:41+00:00Added an answer on May 18, 2026 at 2:47 am

    Two ideas come in mind.

    1). Dynamic LINQ, which allows you to define where operators as strings.

    var result = Northwind.Products
        .Where("CategoryId=2 And UnitPrice>3")
        .OrderBy("SupplierId");
    

    2). Use something as the EntityFilter<T> (see code here), which allows you to define a filter like this:

    IEntityFilter<Person> entityFilter =
        from person in EntityFilter<Person>.AsQueryable()
        where person.Name.StartsWith("a")
        where person.Id < 100
        select person;
    

    You can supply the IEntityFilter<Person> to a business method that will be able to filter that query:

    public static Person[] GetAllPersons(
        IEntityFilter<Person> filter)
    {
        using (var db = ContextFactory.CreateContext())
        {
            IQueryable<Person> filteredList =
                filter.Filter(db.Persons);
    
            return filteredList.ToArray();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to design an application in 3 layers : 1) Data access
I am trying to find what is the usual design/approach for static/global! data access/storage
I am trying to design a set of data controls that contain their own
I'm trying to design my app's interface in IB using a storyboard and have
I am trying to design a dropdown menu that covers the entire width of
I am trying to design model associations in rails that consist of the following
I'm trying to design a portable API in ANSI C89/ISO C90 to access a
I am trying to design a web page that provides content depending on the
I have been working on trying to leverage data contained in an Access Database
We're developing a middle-tier to replace an existing business logic/data access layer. One of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.