Cross platform SQL? (SQLite + MySQL + TSQL)

Is there a cross-platform solution for sql? My prototype was in sqlite. I am switching to a server that offers tsql and I have considered mysql in the past for my web servers (maybe I should stick with tsql and sqlite). I am wondering if there is a .NET lib that allows me to write sql compatible with everyone.

Some of the annoyance that I had was on the creation table. I thought that primary keys automatically increase, but they do not. I have to write id (1,1). When I ported my sqlite code to mysql, I had problems with the create table, but I'm sure there will be other places when my SQL queries become more complex. So I thought trying lib might be a good idea.

+3
source share
3 answers

I personally use SubSonic as an ORM. It supports both SQL-Server and MySQL, as well as SQLite. Creating a database is always a tricky question, but you usually don't run it often. I chose SQLite as it is very portable and should also be available when I use a port using Mono. TSQL (SQL-Server) is a Windows-only product and is not portable. My databases will also not be very large (<100 Mb), and this may also be required for your choice.

( , VS 2010 ), Entity Framework, v1.0 MS . , , . , , - SubSonic.

+2

ORM, NHibernate Entity Framework, sql- . SQL-.

0

Source: https://habr.com/ru/post/1725788/


All Articles