2
I’m looking at the following link that uses Dapper: Getting Started With Postgresql Using Dapper In . NET Core and my question is, when I do Java I don’t need to write 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 I really need to do this? if I need the advantage of using it?
I don’t understand what Java has to do with it.
– Maniero