public static async Task <T> InsertGetIdAsync <T>(this Query query, object data)
        {
            InsertGetIdRow <T> row = await QueryHelper.CreateQueryFactory(query)
                                     .FirstAsync <InsertGetIdRow <T> >(query.AsInsert(data, true));

            return(row.Id);
        }
Exemple #2
0
        public static T InsertGetId <T>(this Query query, object data)
        {
            QueryFactory db = QueryHelper.CreateQueryFactory(query);

            InsertGetIdRow <T> row = db.First <InsertGetIdRow <T> >(query.AsInsert(data, true));

            return(row.Id);
        }