Hi Mohammed, which version of sharpmap is this for? Either way it is likely to be a big job. Linq is probably best used when dealing with domain objects/entities rather than IDataRecords (though there is the Linq to DataSet) currently both 0.9
and v2 use FeatureDataTables internally which are derived from DataTable. We are considering changing v2 to use spatial entities internally though this has consequences when dealing with data from datasources with an arbitary schema. V2 has Expresssions
which should make creating a generic linq provider slightly easier.
If you are trying to do this for 0.9 it may be easier to change SharpMap to use IEnumerable<SomeSpatialEntity> internally (instead of FeatureDataTable) and then use an existing ORM solution (NHibernate, Entity Framework, LinqToSql etc) to
actually interact with the data.
Beware that most ORMs do not have any spatial awareness so you would have to extend the providers.
For NHibernate you can use
There is an article at http://www.devart.com/blogs/dotconnect/?p=385/ about using DevArt with Entity Framework.
It has been a long time since I used LinqToSql but if I remember correctly it did have awareness of CLR types so it should work out of the box with spatial types.
If you really want to make a Linq provider you should take a look at
http://relinq.codeplex.com/ and perhaps
http://iqtoolkit.codeplex.com/ and possibly also the source for NHibernate