I'm looking at the following link using Dapper: Getting Started With PostgreSQL Using Dapper In .NET Core and my question is, when I do it through Java I do not need to write the SQL code as this example here:
//1. Insert
using (var conn = OpenConnection(_connStr))
{
var insertSQL = string.Format(@"INSERT INTO public.customer(firstname, lastname, email,createtime)
VALUES('{0}', '{1}', '{2}','{3}');", "Catcher", "Wong", "[email protected]", DateTime.Now);
var res = conn.Execute(insertSQL);
Console.WriteLine(res > 0 ? "insert successfully!" : "insert failure");
PrintData();
}
For this example, do I really need to do this? if you need the benefit of using it?