using System.Collections.Generic;
using System.Data.SqlClient;
public static void Main()
DapperPlusManager.Entity<Customer>().Table("tbl_Customers");
var list = GenerateListCustomer();
using (var connection = new SqlConnection(FiddleHelper.GetConnectionStringSqlServer()))
connection.BulkInsert(list);
FiddleHelper.WriteTable(connection.Query<Customer>("Select TOP 5 * FROM tbl_Customers").ToList());
public int CustomerID { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public Boolean IsActive { get; set; }
public static List<Customer> GenerateListCustomer()
var customers = new List<Customer>();
for (int i = 0; i < 10; i++)
customers.Add(new Customer() { Name ="Customer_" + i, Description = "Description", IsActive = true });
public static void CreateDatabase()
using (var connection = new SqlConnection(FiddleHelper.GetConnectionStringSqlServer()))
using (var command = connection.CreateCommand())
CREATE TABLE [dbo].[tbl_Customers] (
[CustomerID] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (MAX) NULL,
[Description] NVARCHAR (MAX) NULL,
CONSTRAINT [PK_dbo.tbl_Customers] PRIMARY KEY CLUSTERED ([CustomerID] ASC)
command.ExecuteNonQuery();