Skip to content

Commit f8e0dc5

Browse files
author
Hoang Nguyen Nhat
committed
upgrade net6 - 1.0.4.3
1 parent 20e2246 commit f8e0dc5

File tree

3 files changed

+25
-33
lines changed

3 files changed

+25
-33
lines changed

src/Mix.Heart/Helpers/AesEncryptionHelper.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,19 @@ private static string DecryptString(string cipherText, byte[] key, byte[] iv)
5757
{
5858
using (var aesAlg = Aes.Create())
5959
{
60-
aesAlg.Mode = CipherMode.CBC;
61-
aesAlg.Padding = PaddingMode.PKCS7;
62-
using (var decryptor = aesAlg.CreateDecryptor(key, iv))
60+
try
61+
{
62+
aesAlg.Mode = CipherMode.CBC;
63+
aesAlg.Padding = PaddingMode.PKCS7;
64+
using (var decryptor = aesAlg.CreateDecryptor(key, iv))
65+
{
66+
byte[] encryptedBytes = Convert.FromBase64CharArray(cipherText.ToCharArray(), 0, cipherText.Length);
67+
return Encoding.UTF8.GetString(decryptor.TransformFinalBlock(encryptedBytes, 0, encryptedBytes.Length));
68+
}
69+
}
70+
catch
6371
{
64-
byte[] encryptedBytes = Convert.FromBase64CharArray(cipherText.ToCharArray(), 0, cipherText.Length);
65-
return Encoding.UTF8.GetString(decryptor.TransformFinalBlock(encryptedBytes, 0, encryptedBytes.Length));
72+
return string.Empty;
6673
}
6774
}
6875
}

src/Mix.Heart/Infrastructure/Repositories/ViewRepositoryBaseAsync.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ Expression<Func<TModel, bool>> predicate
116116
UnitOfWorkHelper<TDbContext>.InitTransaction(_context, _transaction, out TDbContext context, out IDbContextTransaction transaction, out bool isRoot);
117117
try
118118
{
119-
TModel model = await context.Set<TModel>().AsNoTracking().SelectMembers(SelectedMembers).SingleOrDefaultAsync(predicate).ConfigureAwait(false);
119+
TModel model = await context.Set<TModel>().AsNoTracking()
120+
.SelectMembers(SelectedMembers).SingleOrDefaultAsync(predicate).ConfigureAwait(false);
120121
if (model != null)
121122
{
122123
context.Entry(model).State = EntityState.Detached;

src/Mix.Heart/Mix.Heart.csproj

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
6-
<Version>1.0.4.1</Version>
6+
<Version>1.1.0.0</Version>
77
<Company>MIXCORE CO., LTD</Company>
88
<Authors>Mixcore Team</Authors>
99
<Product>Mixcore Heart</Product>
@@ -13,45 +13,29 @@
1313
<PackageIconUrl>https://avatars1.githubusercontent.com/u/41290098</PackageIconUrl>
1414
<RepositoryUrl>https://github.com/mixcore/mix.heart</RepositoryUrl>
1515
<PackageTags>mixcore, mixcore cms, dotnet core, asp.net core, web service framework base</PackageTags>
16-
<AssemblyVersion>1.0.4.1</AssemblyVersion>
17-
<FileVersion>1.0.4.1</FileVersion>
16+
<AssemblyVersion>1.1.0.0</AssemblyVersion>
17+
<FileVersion>1.1.0.0</FileVersion>
1818
<LangVersion>latest</LangVersion>
1919
</PropertyGroup>
2020

21-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
</PropertyGroup>
24-
25-
<ItemGroup>
26-
<Compile Remove="Infrastructure\ViewModels\CommonViewModels.cs" />
27-
</ItemGroup>
28-
2921
<ItemGroup>
3022
<PackageReference Include="AutoMapper" Version="10.1.1" />
3123
<PackageReference Include="EPPlus" Version="5.7.1" />
32-
<PackageReference Include="Microsoft.AspNetCore.Http.Features" Version="5.0.8" />
3324
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
34-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.8" />
35-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.8">
25+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
26+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
3627
<PrivateAssets>all</PrivateAssets>
3728
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3829
</PackageReference>
39-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.8" />
40-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.8" />
41-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
30+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" />
31+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
32+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
4233
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
43-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.7" />
44-
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.1" />
34+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" />
35+
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
4536
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.3" />
4637
<PackageReference Include="System.Net.Http" Version="4.3.4" />
4738
<PackageReference Include="System.Net.Requests" Version="4.3.0" />
4839
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
4940
</ItemGroup>
50-
51-
<ItemGroup>
52-
<Compile Update="Helpers\MixCommonHelper.cs">
53-
<ExcludeFromSourceAnalysis>False</ExcludeFromSourceAnalysis>
54-
<ExcludeFromStyleCop>False</ExcludeFromStyleCop>
55-
</Compile>
56-
</ItemGroup>
5741
</Project>

0 commit comments

Comments
 (0)