v1.1.0-preview3

This commit is contained in:
28810
2020-01-09 18:21:29 +08:00
parent 6eb720d2ae
commit 90101e2d22
20 changed files with 40 additions and 27 deletions

View File

@ -1,4 +1,4 @@
#if ns20
#if netcoreapp
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Linq;

View File

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>1.1.0-preview2</Version>
<TargetFrameworks>netstandard2.0;netcoreapp31;netcoreapp22;netcoreapp21;net45;net40</TargetFrameworks>
<Version>1.1.0-preview3</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>YeXiangQin</Authors>
<Description>FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Odbc, 达梦, And Access</Description>
@ -26,16 +26,22 @@
<WarningLevel>3</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>ns20;netstandard20</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net40'">
<DefineConstants>net40</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp31' or '$(TargetFramework)' == 'netcoreapp22' or '$(TargetFramework)' == 'netcoreapp21'">
<DefineConstants>netcoreapp</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp31'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp22'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp21'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FreeSql\FreeSql.csproj" />

View File

@ -110,6 +110,13 @@
清空状态数据
</summary>
</member>
<member name="M:FreeSql.DbSet`1.RemoveAsync(System.Linq.Expressions.Expression{System.Func{`0,System.Boolean}})">
<summary>
根据 lambda 条件删除数据
</summary>
<param name="predicate"></param>
<returns></returns>
</member>
<member name="M:FreeSql.DbSet`1.Add(`0)">
<summary>
添加

View File

@ -1,4 +1,4 @@
#if ns20
#if netcoreapp
using System;
using System.Reflection;

View File

@ -11,7 +11,7 @@ namespace FreeSql
{
public class UnitOfWork : IUnitOfWork
{
#if ns20
#if netcoreapp
public static readonly AsyncLocal<IUnitOfWork> Current = new AsyncLocal<IUnitOfWork>();
#endif
@ -35,7 +35,7 @@ namespace FreeSql
public UnitOfWork(IFreeSql fsql)
{
_fsql = fsql;
#if ns20
#if netcoreapp
Current.Value = this;
#endif
}
@ -48,7 +48,7 @@ namespace FreeSql
_fsql.Ado.MasterPool.Return(_conn);
_tran = null;
_conn = null;
#if ns20
#if netcoreapp
Current.Value = null;
#endif
EntityChangeReport?.Report.Clear();