public override SqlProvider FormatUpdateSelect <T>(Expression <Func <T, T> > updator) { throw new DapperExtensionException("Oracle不支持修改并查询"); var update = ResolveExpression.ResolveUpdate(updator); var selectSql = ResolveExpression.ResolveSelect(null); var fromTableSql = FormatTableName(); var whereSql = ResolveExpression.ResolveWhereList(); SqlString = $"UPDATE {FormatTableName(false, false)} {update.SqlCmd} {whereSql}; {selectSql} {fromTableSql} {whereSql};"; return(this); }
public override SqlProvider FormatUpdate <T>(Expression <Func <T, T> > updateExpression) { var update = ResolveExpression.ResolveUpdate(updateExpression); var fromTableSql = FormatTableName(false, false); ProviderOption.IsAsName = false; var whereSql = ResolveExpression.ResolveWhereList(); Params.AddDynamicParams(update.Param); SqlString = $"UPDATE {fromTableSql} {update.SqlCmd} {whereSql}"; return(this); }