Commit 1a506e8e authored by David Chell's avatar David Chell

Fixed Insert not inserting when the object had no primary key.

parent 0d9705b4
......@@ -190,8 +190,6 @@ private static string GetTableName(Type type)
sb.Append(") ");
long id = 0;
#if POSTGRESQL
if (keyProperties.Count() > 0)
{
sb.Append(" RETURNING ");
for (var i = 0; i < keyProperties.Count(); i++)
{
......@@ -209,7 +207,6 @@ private static string GetTableName(Type type)
if (id == 0)
id = Convert.ToInt64(value);
}
}
#else
connection.Execute(sb.ToString(), entityToInsert, transaction: transaction, commandTimeout: commandTimeout);
//NOTE: would prefer to use IDENT_CURRENT('tablename') or IDENT_SCOPE but these are not available on SQLCE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment