I wanna to know what best practices would be used to work with Oracle and SQL from .Net.
Precedences : free solution , performance of queries, reusable code.
For example, will be beautiful to use the same LINQ queries to Oracle and SQL. But as far as I know LINQ2SQL is only to Sql, entity framework – no oracle provider(for example I don’t want buy it and use from Codeplex), nHibernate – so I need performance that is approximated to pure query.
What do you use in your projects my .NET brothers? 🙂
Thanks for your experience.
I would either use
NHibernateorEnterprise Libraryand theData Access Application Block.Here’s a link where is shown how to use it.
Using Microsoft Enterprise Library Data Access Application Block – Part IIAnd another one under the form of a brief tutorial.
Get Started with the Enterprise Library Data Access Application BlockIn short,
NHibernateis an ORM (Object-Relational Mapping) tool that lets you map, using XML files, your object-oriented classes to underlying data tables, no matter what underlying datastore you’re using. Suffice to configure it with a connection string to your datastore and provide it with the right .NET data provider to make it work altogether.On the other hand,
Enterprise Library's Data Access Application Blockis a kind of wrapper over the traditional ADO.NET to simplify its use. You can name connection strings and open connections to these underlying named database/connection string. Once you will master theDatabaseobject of this library, and its configuration features, nothing will possibly stop you from accessing your data.Does this help?
Do you need any further details which I could help you with?
EDIT #1
Nothing in .NET will perform as “pure SQL queries”, as .NET is managed code. Plus, you have to consider the connection overhead and authentication before you can query against the database.
EDIT #2
Here for a list of supported databases with NHibernate:
Databases supported by NHibernateI don’t seem to be able to easily find (fast) a list of supported databases with the EntLib DAAB, but here’s what I have already worked with so far:
Many others are supported also.