I have looked over the Repository pattern and I recognized some ideas that I was using in the past which made me feel well.
However now I would like to write an applicat
You can create an external XML file mapping the database to any class:
And then pass the XML to a DataContext class:
using (var cn = GetDbConnection())
{ var mappingSrc = XmlMappingSource.FromReader(xmlReader);
using (var db = new DataContext(cn, mappingSrc))
{ var q = from entity in db.GetTable()
where entity.PropertyA = "..."
select entity.ID;
}
}