Skip to content

Commit

Permalink
v2.0.0-preview1109 #521 #445
Browse files Browse the repository at this point in the history
  • Loading branch information
2881099 committed Nov 6, 2020
1 parent 0de96ef commit d01cbdd
Show file tree
Hide file tree
Showing 26 changed files with 33 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>BaseEntity 是一种极简单的 CodeFirst 开发方式,特别对单表或多表CRUD,利用继承节省了每个实体类的重复属性(创建时间、ID等字段),软件删除等功能,进行 crud 操作时不必时常考虑仓储的使用.</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 扩展包,可实现实体类属性为对象时,以JSON形式映射存储.</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 扩展包,可实现【延时加载】属性.</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 扩展包,实现 linq queryable 和 linq to sql 语法进行开发.</Description>
Expand Down
7 changes: 6 additions & 1 deletion Extensions/FreeSql.Extensions.Linq/SelectedQueryProvider.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using FreeSql.Internal.Model;
using FreeSql.Internal.CommonProvider;
using FreeSql.Internal.Model;
using System;
using System.Collections.Generic;
using System.Data;
Expand All @@ -13,6 +14,8 @@ namespace FreeSql
{
public interface ISelectedQuery<TOut>
{
Select0Provider SelectOwner { get; }

#if net40
#else
Task<List<TOut>> ToListAsync();
Expand Down Expand Up @@ -79,6 +82,8 @@ public override string ParseExp(Expression[] members)
return read.DbField;
}

public Select0Provider SelectOwner => _select;

#if net40
#else
public Task<List<TOut>> ToListAsync()
Expand Down
2 changes: 1 addition & 1 deletion Extensions/FreeSql.Generator/FreeSql.Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Description>使用 FreeSql 快速生成数据库的实体类,安装:dotnet tool install -g FreeSql.Generator</Description>
<PackageProjectUrl>https://github.com/2881099/FreeSql</PackageProjectUrl>
<RepositoryUrl>https://github.com/2881099/FreeSql</RepositoryUrl>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<PackageTags>FreeSql DbFirst 实体生成器</PackageTags>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion FreeSql.All/FreeSql.All.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 全家桶,懒人专用</Description>
Expand Down
2 changes: 1 addition & 1 deletion FreeSql.DbContext/FreeSql.DbContext.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp31;netcoreapp30;netcoreapp22;netcoreapp21;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Firebird, Odbc, 达梦, 人大金仓, 神舟通用, 翰高, And Access</Description>
Expand Down
16 changes: 0 additions & 16 deletions FreeSql.DbContext/FreeSql.DbContext.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion FreeSql.Repository/FreeSql.Repository.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp31;netcoreapp30;netcoreapp22;netcoreapp21;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql Implementation of General Repository, Support MySql/SqlServer/PostgreSQL/Oracle/Sqlite/Firebird/达梦/人大金仓/神舟通用/翰高/Access, and read/write separation、and split table.</Description>
<PackageProjectUrl>https://github.com/2881099/FreeSql/wiki/Repository</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion FreeSql/FreeSql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Firebird, Odbc, 达梦, 人大金仓, 神舟通用, 翰高, And Access</Description>
Expand Down
8 changes: 4 additions & 4 deletions FreeSql/Internal/CommonExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1622,12 +1622,12 @@ public string GetWhereCascadeSql(SelectTableInfo tb, List<GlobalFilter.Item> fil
var errorKey = FreeUtil.Sha1($"{(isMultitb ? 1 : 0)},{fl.Where.ToString()}");
if (dicSqlError.ContainsKey(errorKey)) continue;

var visitor = new ReplaceVisitor();
var visitor = new ReplaceParameterVisitor();
try
{
var expExp = Expression.Lambda(
typeof(Func<,>).MakeGenericType(tb.Table.Type, typeof(bool)),
new ReplaceVisitor().Modify(fl.Where, newParameter),
new ReplaceParameterVisitor().Modify(fl.Where, newParameter),
newParameter
);
var whereSql = ExpressionLambdaToSql(expExp.Body, new ExpTSC { _tables =
Expand All @@ -1652,7 +1652,7 @@ public string GetWhereCascadeSql(SelectTableInfo tb, List<GlobalFilter.Item> fil
}
return null;
}
internal class ReplaceVisitor : ExpressionVisitor
public class ReplaceParameterVisitor : ExpressionVisitor
{
private ParameterExpression parameter;
private ParameterExpression oldParameter;
Expand All @@ -1670,7 +1670,7 @@ protected override Expression VisitMember(MemberExpression node)
}
}

internal class ReplaceHzyTupleToMultiParam : ExpressionVisitor
public class ReplaceHzyTupleToMultiParam : ExpressionVisitor
{
private List<SelectTableInfo> tables;
private ParameterExpression[] parameters;
Expand Down
2 changes: 1 addition & 1 deletion FreeSql/Internal/GlobalFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ GlobalFilter Apply<TEntity>(bool only, string name, Func<bool> condition, Expres

var newParameter = Expression.Parameter(typeof(TEntity), $"gf{_id}");
var newlambda = Expression.Lambda<Func<TEntity, bool>>(
new CommonExpression.ReplaceVisitor().Modify(where, newParameter),
new CommonExpression.ReplaceParameterVisitor().Modify(where, newParameter),
newParameter
);
item.Where = newlambda;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 达梦数据库 Ado.net (DmProvider)</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net452</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 Firebird</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 人大金仓数据库 Ado.Net (Kdbndp)</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库 Ms Access 实现</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net452;net451;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 MySql 5.6,Ado.Net 驱动是 MySql.Data(Oracle官方)</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 MySql 5.6,Ado.Net 驱动是 MySqlConnector</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库 Odbc 实现,基于 {Oracle}、{SQL Server}、{MySQL ODBC 8.0 Unicode Driver}、{PostgreSQL Unicode(x64)}、{DM8 ODBC Driver} 专用访问实现,以及通用 Odbc 访问所有数据库</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 Oracle 11</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461;net452;net451;net45</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 PostgreSQL 9.5</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 神舟通用数据库 7.0.8</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net451;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 SqlServer 2005+,并根据版本适配分页方法:row_number 或 offset fetch next</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net451;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 System.Data.SqlClient + SqlServer 2005+,并根据版本适配分页方法:row_number 或 offset fetch next</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.0-preview1108</Version>
<Version>2.0.0-preview1109</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql 数据库实现,基于 Sqlite 3.0,支持 .NetCore、.NetFramework、Xamarin</Description>
Expand Down

0 comments on commit d01cbdd

Please sign in to comment.