I started experimenting with LINQ to SQL, and what I am doing is basically creating classes with LINQ display decorators, thereby choosing which parts of the db table schema I want to include in my classes.
A simple example:
private DateTime? _LocalCopyTimestamp = (DateTime)SqlDateTime.MinValue;
[Column(Name = "recaLocalCopyTimestamp", Storage = "_LocalCopyTimestamp", CanBeNull = true)]
public DateTime? LocalCopyTimestamp
{
get
{
return this._LocalCopyTimestamp;
}
set
{
this._LocalCopyTimestamp = value;
}
}
I do not use and do not want to resort to modeling tools due to design inconsistencies (as happens with schema changes and because there is an existing database schema and it is too organic and not strict).
Is there a way to have this flexibility with the Entity Framework without having to include schema information files and / or many different code files?
Can I then create classes that “use” more than one base table?
Can someone point me to the documentation on this?