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

  • Home
  • SEARCH
  • 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 3274374
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:01:50+00:00 2026-05-17T19:01:50+00:00

Tier database and every single table has a DataSetId and I absolutely want to

  • 0

Tier database and every single table has a DataSetId and I absolutely want to be sure that the data is always partitioned correctly.

Currently I’m using the QueryInterceptor attribute but it’s messy and overly repetitive and prone to errors. Some new Dev could add a new table and forget to filter by DataSetId, or just rename a table. So I’ve put this in a base class but the IQuerable properties of my repository are never called.

I have a “CoreRepository” class that inherits from ObjectContext, and each of my IQueryable collections uses “CoreObjectSet”. CoreObjectSet extends ObjectSet by always adding an expression to filter by DataSetId. When used directly this works fine. But when used for a DataService the Get accessor for the collections on the Repository are never called by the DataService. It appears to be cheating and not using them at all and accessing the data directly.

Is there a way to get the DataService to access through the repository class correctly (And still get the efficiency of passing through the query as SQL)?

If this is the behaviour why even make DataService of T anyway if it’s not even going to use the class? For the ADO team to just ignore it and use the edmx directly seems like a hack.

Thanks
Aaron

  • 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-17T19:01:50+00:00Added an answer on May 17, 2026 at 7:01 pm

    Looks like the only way around it is to use a T4 template to generate the DataService. I much prefer a base class or some kind of reusable handler but ADO has given me no choice here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web-app-database 3 tier server setup. Web requests data from app, and
I have a data tier select method that returns a datatable. It's called from
I have a three-tier application which is installed in corporate environments. With every server
Within an n-tier app that makes use of a WCF service to interact with
We're embarking on a new middle tier service that will allow internal client systems
The project I'm working is using n-tier architecture. Our layers are as follows: Data
I have a 3-tier .NET service app, which follows the standard approach: Frontend ->
I have inherited a middle tier system with some multi-Threading issues. Two different threads,
I'm working with an n-Tier application using WinForm and WCF Engine Service (Windows Service)
I am using T4 to generate some screens and middle-tier code for a project,

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.