public void Insert<T>(T obj)
Console.WriteLine("Inserting an object with type {0}", typeof(T).FullName);
protected readonly Dapper.DbConnection _connection = new Dapper.DbConnection();
public void InsertDynamicObject(object obj)
typeof(Dapper.DbConnection)
.MakeGenericMethod(new [] { obj.GetType() })
.Invoke(_connection, new[] { obj });
public static void Main()
object someObject = "Test";
var connector = new DbConnector();
connector.InsertDynamicObject(someObject);