Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ismcagdas committed Dec 8, 2022
2 parents 9800f0b + 772d10e commit 14351ef
Show file tree
Hide file tree
Showing 152 changed files with 439 additions and 5,067 deletions.
14 changes: 0 additions & 14 deletions Abp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.TestBase", "src\Abp.Tes
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.TestBase.Tests", "test\Abp.TestBase.Tests\Abp.TestBase.Tests.csproj", "{32041945-7035-410D-A1D5-E5779122114A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.TestBase.SampleApplication", "test\Abp.TestBase.SampleApplication\Abp.TestBase.SampleApplication.csproj", "{D0BBBAD1-D373-45EB-8346-4AD629AFCAC0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.TestBase.SampleApplication.Tests", "test\Abp.TestBase.SampleApplication.Tests\Abp.TestBase.SampleApplication.Tests.csproj", "{C6C58C8F-CDF4-42E2-8088-332D776B2780}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.Owin", "src\Abp.Owin\Abp.Owin.csproj", "{558FB5A4-09AD-469E-8865-30B903C17F47}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Abp.RedisCache", "src\Abp.RedisCache\Abp.RedisCache.csproj", "{0DBA5587-9ECE-4E86-B798-FCF28A130A0F}"
Expand Down Expand Up @@ -251,14 +247,6 @@ Global
{32041945-7035-410D-A1D5-E5779122114A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32041945-7035-410D-A1D5-E5779122114A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32041945-7035-410D-A1D5-E5779122114A}.Release|Any CPU.Build.0 = Release|Any CPU
{D0BBBAD1-D373-45EB-8346-4AD629AFCAC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0BBBAD1-D373-45EB-8346-4AD629AFCAC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0BBBAD1-D373-45EB-8346-4AD629AFCAC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0BBBAD1-D373-45EB-8346-4AD629AFCAC0}.Release|Any CPU.Build.0 = Release|Any CPU
{C6C58C8F-CDF4-42E2-8088-332D776B2780}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C6C58C8F-CDF4-42E2-8088-332D776B2780}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C6C58C8F-CDF4-42E2-8088-332D776B2780}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C6C58C8F-CDF4-42E2-8088-332D776B2780}.Release|Any CPU.Build.0 = Release|Any CPU
{558FB5A4-09AD-469E-8865-30B903C17F47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{558FB5A4-09AD-469E-8865-30B903C17F47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{558FB5A4-09AD-469E-8865-30B903C17F47}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -538,8 +526,6 @@ Global
{CED2AC21-F052-4654-BBA3-01556BE2C61B} = {1E6B9E8D-D5C1-4AD7-89F9-7179FEFD7C01}
{BCA80B2B-871B-4A6F-B719-5FF6017BC572} = {DFF0464B-5402-4DD6-86F5-2AEC1163B232}
{32041945-7035-410D-A1D5-E5779122114A} = {1E6B9E8D-D5C1-4AD7-89F9-7179FEFD7C01}
{D0BBBAD1-D373-45EB-8346-4AD629AFCAC0} = {1E6B9E8D-D5C1-4AD7-89F9-7179FEFD7C01}
{C6C58C8F-CDF4-42E2-8088-332D776B2780} = {1E6B9E8D-D5C1-4AD7-89F9-7179FEFD7C01}
{558FB5A4-09AD-469E-8865-30B903C17F47} = {DFF0464B-5402-4DD6-86F5-2AEC1163B232}
{0DBA5587-9ECE-4E86-B798-FCF28A130A0F} = {DFF0464B-5402-4DD6-86F5-2AEC1163B232}
{0B306A5A-FCEC-4E0B-A800-ECC9F94FFDC9} = {1E6B9E8D-D5C1-4AD7-89F9-7179FEFD7C01}
Expand Down
2 changes: 1 addition & 1 deletion build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<RootNamespace></RootNamespace>
<IsPackable>False</IsPackable>
Expand Down
4 changes: 2 additions & 2 deletions common.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>7.4.0</Version>
<Version>8.0.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<PackageIcon>abp_nupkg.png</PackageIcon>
<PackageIconUrl>http://www.aspnetboilerplate.com/images/abp_nupkg.png</PackageIconUrl>
Expand All @@ -17,6 +17,6 @@
<None Include="../../nupkg/abp_nupkg.png" Pack="true" PackagePath="/"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.0-beta-20204-02" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>
</Project>
5 changes: 2 additions & 3 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"sdk": {
"version": "6.0.100",
"rollForward": "latestMinor"
"version": "7.0.100-preview.3.22179.4"
}
}
}
2 changes: 1 addition & 1 deletion src/Abp.AspNetCore.OData/Abp.AspNetCore.OData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.AspNetCore.OData</AssemblyName>
<PackageId>Abp.AspNetCore.OData</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.AspNetCore.PerRequestRedisCache</AssemblyName>
<PackageId>Abp.AspNetCore.PerRequestRedisCache</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion src/Abp.AspNetCore.SignalR/Abp.AspNetCore.SignalR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.AspNetCore.SignalR</AssemblyName>
<PackageId>Abp.AspNetCore.SignalR</PackageId>
Expand Down
4 changes: 2 additions & 2 deletions src/Abp.AspNetCore.TestBase/Abp.AspNetCore.TestBase.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.AspNetCore.TestBase</AssemblyName>
<PackageId>Abp.AspNetCore.TestBase</PackageId>
Expand All @@ -25,7 +25,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.10" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Abp.AspNetCore/Abp.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.AspNetCore</AssemblyName>
<PackageId>Abp.AspNetCore</PackageId>
Expand Down Expand Up @@ -35,8 +35,8 @@
<ItemGroup>
<PackageReference Include="Castle.LoggingFacility.MsLogging" Version="3.1.0" />
<PackageReference Include="Castle.Windsor.MsDependencyInjection" Version="3.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Abp.AutoMapper/Abp.AutoMapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.AutoMapper</AssemblyName>
<PackageId>Abp.AutoMapper</PackageId>
Expand All @@ -25,8 +25,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AutoMapper" Version="10.1.1" />
<PackageReference Include="AutoMapper.Collection" Version="7.0.1" />
<PackageReference Include="AutoMapper" Version="12.0.0" />
<PackageReference Include="AutoMapper.Collection" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net462</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.EntityFramework.GraphDiff</AssemblyName>
<PackageId>Abp.EntityFramework.GraphDiff</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion src/Abp.EntityFramework/Abp.EntityFramework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFrameworks>net461;net6.0</TargetFrameworks>
<TargetFrameworks>net462;net7.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.EntityFramework</AssemblyName>
<PackageId>Abp.EntityFramework</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.EntityFrameworkCore.EFPlus</AssemblyName>
<PackageId>Abp.EntityFrameworkCore.EFPlus</PackageId>
Expand All @@ -22,7 +22,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="6.15.2" />
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="7.17.1" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Abp.EntityFrameworkCore/Abp.EntityFrameworkCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.EntityFrameworkCore</AssemblyName>
<PackageId>Abp.EntityFrameworkCore</PackageId>
Expand All @@ -26,8 +26,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,11 @@ public override TEntity Insert(TEntity entity)
{
return GetTable().Add(entity).Entity;
}

public override Task<TEntity> InsertAsync(TEntity entity)
public override async Task<TEntity> InsertAsync(TEntity entity)
{
return Task.FromResult(Insert(entity));
var table = await GetTableAsync();
return (await table.AddAsync(entity)).Entity;
}

public override TPrimaryKey InsertAndGetId(TEntity entity)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Abp.Reflection;
using Abp.Domain.Entities;
using Abp.Domain.Repositories;
Expand All @@ -25,5 +28,41 @@ public static class EfCoreRepositoryExtensions
{
repository.GetDbContext().Entry(entity).State = EntityState.Detached;
}

public static void InsertRange<TEntity, TPrimaryKey>(this IRepository<TEntity, TPrimaryKey> repository, params TEntity[] entities)
where TEntity : class, IEntity<TPrimaryKey>
{
repository.GetDbContext().AddRange(entities.ToArray<object>());
}

public static void InsertRange<TEntity, TPrimaryKey>(this IRepository<TEntity, TPrimaryKey> repository, IEnumerable<TEntity> entities)
where TEntity : class, IEntity<TPrimaryKey>
{
repository.GetDbContext().AddRange(entities);
}

public static async Task InsertRangeAsync<TEntity, TPrimaryKey>(this IRepository<TEntity, TPrimaryKey> repository, params TEntity[] entities)
where TEntity : class, IEntity<TPrimaryKey>
{
await repository.GetDbContext().AddRangeAsync(entities.ToArray<object>());
}

public static async Task InsertRangeAsync<TEntity, TPrimaryKey>(this IRepository<TEntity, TPrimaryKey> repository, IEnumerable<TEntity> entities)
where TEntity : class, IEntity<TPrimaryKey>
{
await repository.GetDbContext().AddRangeAsync(entities);
}

public static void RemoveRange<TEntity, TPrimaryKey>(this IRepository<TEntity, TPrimaryKey> repository, params TEntity[] entities)
where TEntity : class, IEntity<TPrimaryKey>
{
repository.GetDbContext().RemoveRange(entities.ToArray<object>());
}

public static void RemoveRange<TEntity, TPrimaryKey>(this IRepository<TEntity, TPrimaryKey> repository, IEnumerable<TEntity> entities)
where TEntity : class, IEntity<TPrimaryKey>
{
repository.GetDbContext().RemoveRange(entities);
}
}
}
2 changes: 1 addition & 1 deletion src/Abp.MailKit/Abp.MailKit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<ItemGroup>
<PackageReference Include="System.Runtime" Version="4.3.1" />
<PackageReference Include="MailKit" Version="3.4.1" />
<PackageReference Include="MailKit" Version="3.4.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
using Abp.Dependency;
using Abp.Domain.Entities;
using Abp.Domain.Uow;
using Abp.NHibernate.Uow;
using NHibernate.Engine;
using NHibernate.Event;
using NHibernate.Event.Default;
using NHibernate.Persister.Entity;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace Abp.NHibernate.EventListeners
{
internal class AbpNHibernateLoadEventListener : DefaultLoadEventListener
{
private readonly IIocManager _iocManager;
private readonly Lazy<IUnitOfWork> _unitOfWork;

public AbpNHibernateLoadEventListener(IIocManager iocManager)
{
_iocManager = iocManager;

_unitOfWork =
new Lazy<IUnitOfWork>(() => _iocManager.Resolve<IUnitOfWork>());
}
protected override object DoLoad(LoadEvent @event, IEntityPersister persister, EntityKey keyToLoad, LoadType options)
{
var result = base.DoLoad(@event, persister, keyToLoad, options);
if (_unitOfWork.Value.IsFilterEnabled(AbpDataFilters.SoftDelete))
if (@event.Session.IsFilterEnabled(AbpDataFilters.SoftDelete))
{
if (result is ISoftDelete softDeletable)
{
Expand All @@ -41,7 +30,7 @@ protected override object DoLoad(LoadEvent @event, IEntityPersister persister, E
CancellationToken cancellationToken)
{
var result = await base.DoLoadAsync(@event, persister, keyToLoad, options, cancellationToken);
if (_unitOfWork.Value.IsFilterEnabled(AbpDataFilters.SoftDelete))
if (@event.Session.IsFilterEnabled(AbpDataFilters.SoftDelete))
{
if (result is ISoftDelete softDeletable)
{
Expand Down
13 changes: 13 additions & 0 deletions src/Abp.NHibernate/NHibernate/Uow/ISessionExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using NHibernate;

namespace Abp.NHibernate.Uow
{
public static class NhSessionExtensions
{
public static bool IsFilterEnabled(this ISession session, string filterName)
{
var filter = session.GetEnabledFilter(filterName);
return filter != null;
}
}
}
2 changes: 1 addition & 1 deletion src/Abp.Owin/Abp.Owin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net462</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.Owin</AssemblyName>
<PackageId>Abp.Owin</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion src/Abp.RedisCache.ProtoBuf/Abp.RedisCache.ProtoBuf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="protobuf-net" Version="3.1.22" />
<PackageReference Include="protobuf-net" Version="3.1.25" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 2 additions & 4 deletions src/Abp.Web.Api.OData/Abp.Web.Api.OData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net462</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.Web.Api.OData</AssemblyName>
<PackageId>Abp.Web.Api.OData</PackageId>
Expand Down Expand Up @@ -34,9 +34,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNet.OData" Version="7.5.17" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />

<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Abp.Web.Api/Abp.Web.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="..\..\configureawait.props" />

<PropertyGroup>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net462</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Abp.Web.Api</AssemblyName>
<PackageId>Abp.Web.Api</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private static void AddActionScript(StringBuilder script, ModuleApiDescriptionMo

AddAjaxCallParameters(script, controller, action);

script.AppendLine(" }, ajaxParams));;");
script.AppendLine(" }, ajaxParams));");
script.AppendLine(" };");
}

Expand Down

0 comments on commit 14351ef

Please sign in to comment.