hi all. 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?