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 960195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:08:40+00:00 2026-05-16T01:08:40+00:00

I have Three Tables in SqlServer (equivalent to image in link below in SQL

  • 0

I have Three Tables in SqlServer (equivalent to image in link below in SQL Server)

http://www.mojoimage.com/free-image-hosting-view-06.php?id=2Untitled-2.gif

and when i use LINQ to Sql i get three classes in dbml file:

class Item
{
Guid ItemId;
int ItemSize;
}

class Video
{
Guid RecordId;
Guid ItemId;
string Resolution;
}

class Audio
{
Guid RecordId;
Guid ItemId;
int Duration;
}

then i create this three interfaces:

Interface IItem
{
Guid ItemId;
int ItemSize;
}

Interface IVideo
{
string Resolution;
}

Interface IAudio
{
int Duration;
}

and a class named VideoItem that implements both “Video” interface and “Item” interface:

class VideoItem:IItem,IVideo
{
public Guid ItemId;
public int ItemSize;
public string Resolution;
}

and a class named AudioItem that implements both “Audio” interface and “Item” interface.

class AudioItem :IItem,IVideo
{
public Guid ItemId;
public int ItemSize;
public int Duration;
}

now i want to use LINQ to query VideoItem instances from my tables (those are in both Item table and Video table).

do i need to create custom LINQ provider?

  • 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-16T01:08:41+00:00Added an answer on May 16, 2026 at 1:08 am

    The solution provided by @James will be a lot easier than writing a custom LINQ provider. You can select a join between the two entities by using a LINQ query joining the two tables and selecting the results as an AudioItem or VideoItem respectively.

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

Sidebar

Related Questions

I have a Microsoft SQL Server 2008 query that returns data from three tables
I'm working with SQL Server 2008. Let's say I have these three tables: Product
i have three tables (SQL Server) Month - month_id , month name, .... Award
I have a SQL Server 2008 database. This database has three tables: Person -
I have three tables in SQL Server 2008 R2: Country Address and Country_Address Country
I have three tables, with the following structure: http://dl.dropbox.com/u/2586403/ORMIssues/TableLayout.png The three objects I'm dealing
We have two tables in a SQL Server 2005 database, A and B.There is
I'm using SQL Server 2008 and I have a table with three columns: Length
We have a few tables with persisted computed columns in SQL Server. Is there
I'm using SQL Server 2008 and I have 3 tables, x , y and

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.