OleDb
types are in System.Data.dll, which is referenced by default in most projects. If you're targeting .NET Core (.NET 5 and later are based on .NET Core)) then you need to install the System.Data.OleDb NuGet package. Non-standard types are pretty much always added via NuGet in .NET Core projects. As always, you should read the relevant documentation. The documentation for every type tells you what namespace it's a member of and what assembly it's declared in. The .NET Framework 4.8 version is here:OleDb
is part of the Platform Extensions and not part of .NET Core itself because it is Windows-specific.OleDbFactory
class. I was thinking that my blog post would cover it but it doesn't things in a more provider-agnostic way. The class is a singleton, so you get the one and only instance from the class like so:var factory = OleDbFactory.Instance;
OleDbFactory
class and I told you how to get an instance of that class. If you want to create an OleDbParameter
directly, rather than through the factory, you just use a constructor for that type.DbFactory
, you can call methods on the factory to create a DbCommand
an DbParameter
.