Code snippet to read ESRI File Geo-database (FileGDB) using GDAL and C#. By default it uses GDAL's 'OpenFileGDB' (read only) driver with out any external dependencies. If you are interested in editing GDB feature class you should use 'FileGDB' (read-write) driver, which had dependency on ESRI's FGDB API SDK. The UCLA's internal testing showed that ESRI's FileGDB driver drags the performance than OpenFileGDB for read-only operation. So choose the driver according to your needs.
However, both GDAL drivers and ESRI's API do not support the raster dataset inside the GDB till date.
public static void ReadEsriGdb(string gdbPath, string featureLayerName)
{
//Register the vector drivers
Ogr.RegisterAll();
//Reading the vector data
DataSource dataSource = Ogr.Open(gdbPath, 0);
Layer layer = dataSource.GetLayerByName(featureLayerName);
}
//call
ReadEsriGdb("gdbPath.gdb", "counties");