[dba-VB] Access MS Access databases a la' ADO.NET EF...

Gustav Brock Gustav at cactus.dk
Sun Jun 16 02:54:03 CDT 2013


Hi Shamil

Thanks. This seems so simple that you might use it in those simple cases where you would refrain from the EF.

/gustav

>>> Salakhetdinov Shamil <mcp2004 at mail.ru> 15-06-13 23:55 >>>
 Hi All --

If you ever wanted to process MS Access Databases using similar to ADO.NET EF/LINQ approach here is an open source project, which could help:

https://github.com/jamietre/IQMap

I have run a few selection tests using*MSAccessDataStorageController which I have quickly made from available in the source project MSSQLDataStorageController and my tests worked OK, e.g:

string fullPath = @"E:\Projects\Third-Party Sources\IQMap-master\Databases\TestAnimals.mdb"; // my test mdb
string connectionString = string.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}", fullPath);
IQ.Config.DefaultConnectionString = connectionString;
IQ.Config.DataStorageController = new MSAccessDataStorageController();
IEnumerable<Dog> dogs = IQ.From<Dog>().OrderBy(x => x.Name);
foreach (var a in dogs)
{
System.Console.WriteLine("{0} {1} {2} {3}", a.Id, a.Name, a.Age, a.Weight);
}
The same author *- James Treworgy * ( https://github.com/jamietre ) - has *published some other useful open source projects as e.g. jQuery port to C# *( https://github.com/jamietre/CsQuery ) etc.


-- 
Салахетдинов Шамиль




More information about the dba-VB mailing list