Upsert sample?
Closed this issue · 3 comments
cuentawarra commented
I dont know how to do an upsert nor select table where i have the following code dynamic list is a dynamic object from a linq query:
var cnx = @"host=localhost;port=5432;database=db1;user id=postgres; password=testing";
var sql = new SqlFuConnection(cnx, DbEngine.PostgreSQL);
sql.Upsert(dynamiclist);
How i can do it right?
Thank you.
sapiens commented
I don't think Upsert works with lists
cuentawarra commented
Then how i can do to work
sapiens commented
Try it the old fashioned way, try to update rows then do inserts when the update returns 0. But I think you can't use any strongly typed helpers, dynamic is supported only for queries (mapping to).