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