方法为:
public static object InsertWithIdentity<T>(this IDataContext dataContext, T obj);
例:
var rowId = db.InsertWithIdentity(newRow); newRow.Id = (long)rowId;
对应的SQL语句为:
SELECT last_insert_rowid()
时间: 2024-10-11 19:09:43
方法为:
public static object InsertWithIdentity<T>(this IDataContext dataContext, T obj);
例:
var rowId = db.InsertWithIdentity(newRow); newRow.Id = (long)rowId;
对应的SQL语句为:
SELECT last_insert_rowid()