So it appears with a simple designer change I can make the 3 tables implement the same interface without any additional coding, from here is it possible to get the rows to behave as queryable objects of the interface type without pulling the whole table down into memory and row by row cast?
each table can be treated as such:
[Table(Name="dbo.bLog")]
public partial class bLog : IBlogRow
where the interface is:
public interface IBlogRow
{
String App{get;set;}
String Version{get;set;}
String Message{get;set;}
DateTime dt{get;set;}
int? value {get;set;}
String ex {get;set;}
int? SecsTaken{get;set;}
bool? loanLevel{get;set;}
}
I think this is a contravariance or covariance problem. I can't seem to cast the table as a system.linq.table nor cast it as IQueryable ? How would I get this working so that i can write the same query code for all 3 tables that have the same design, and use them interchangeably?