If you use NHibernate, changing the SQL dialect is a configuration option in you web.config or app.config. You don't need to use LINQ for this, but you must use one of NHibernate's query methods (HQL, CriteriaAPI, Linq2NH, with more coming in the next version).
Things to watch out for: For some very special cases it may be necessary to provide SQL to NHibernate, or bypass NHibernate completely. Those cases would need special handling of course. Another issue is with creating and updating the database schema. The DML required for this is also usually different in different databases. NHibernate can generate a dialect specific schema creation script from your mappings, but depending on the amount and complexity of changes from version to version you may need to manually maintain different SQL upgrade scripts for each database. You could have a look at LiquiBase for a possible tool to help with this. /Oskar 2010/5/6 Rajesh Chaudhary <[email protected]>: > Hi, > we want that our web based product supports multiple databases so can > we use nhibernate in .net for this purposes ? If yes then what > architecture we need to implement so we can switch any database as per > our customer need and how much effort it will require? > > Should we also need to use LINQ with NHibernate? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
