using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.Data.SqlClient;
public static void Main()
var connection = new SqlConnection(FiddleHelper.GetConnectionStringSqlServer());
connection.CreateTable<Customer>();
FiddleHelper.WriteTable("CustomCustomer:", connection.Query<Customer>("SELECT CustomerID, FullName as Name, Email, Version FROM CustomerWithAnnotation"));
[Table("CustomerWithAnnotation")]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int CustomerID { get; set; }
[Column("FullName", TypeName="nvarchar(50)")]
public string Name { get; set; }
public string Email { get; set; }
public byte[] Version { get; set; }
public string NotMapped { get; set; }