using Dotmim.Sync.SqlServer;
using System.Data.SqlClient;
using System.Data.SQLite;
using System.Threading.Tasks;
public int ShipperID { get; set; }
public string CompanyName { get; set; }
public string Phone { get; set; }
public static async Task Main()
string sql = "SELECT TOP 10 * FROM Shippers";
using (var connection = new SqlConnection(FiddleHelper.GetConnectionStringSqlServerNorthwind()))
var orderDetails = await connection.QueryAsync<Shipper>(sql).ConfigureAwait(false);
Console.WriteLine(orderDetails.Count());
FiddleHelper.WriteTable(orderDetails);
private static void CreateDatabase()
using (var connection = new SqlConnection(FiddleHelper.GetConnectionStringSqlServer()))
using (var command = connection.CreateCommand())
ShipperID int IDENTITY (1, 1) NOT NULL ,
CompanyName nvarchar (40) NOT NULL ,
Phone nvarchar (24) NULL ,
CONSTRAINT PK_Shippers PRIMARY KEY CLUSTERED
SupplierID int IDENTITY (1, 1) NOT NULL ,
CompanyName nvarchar (40) NOT NULL ,
ContactName nvarchar (30) NULL ,
ContactTitle nvarchar (30) NULL ,
Address nvarchar (60) NULL ,
City nvarchar (15) NULL ,
Region nvarchar (15) NULL ,
PostalCode nvarchar (10) NULL ,
Country nvarchar (15) NULL ,
Phone nvarchar (24) NULL ,
CONSTRAINT PK_Suppliers PRIMARY KEY CLUSTERED
command.ExecuteNonQuery();
Console.WriteLine("GOT HERE");