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 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'm writing a simple movie database which has a three tier stack of service
Using a VS2010 SP1 Data-tier application project, I created the simplest database I could:
I try to construct 3-tier application. In DAL I get data from database (
I'm only slightly familiar with the features of Data Tier Applications and what Database
I have a web-app-database 3 tier server setup. Web requests data from app, and
I'm working on a Java project that incorporates a PostgresSQL 9.0 database tier, using
I have for some time build n-tier Applications using a database server as the
I am using Mysql database. I have 3 table-: table Column tier_price customer_id,sku(Unique),price,website catalog_product
.Net4 Entity Framework, N-Tier (so objects are detatched) I have 2 objects generated Database
Middle-tier component will execute the data access routines in application. The component will call

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.