Skip to content

Commit e5753d2

Browse files
Merge pull request #209 from AntonioFalcao/release
Updating
2 parents ac74d56 + 9c897c7 commit e5753d2

File tree

15 files changed

+1321
-1359
lines changed

15 files changed

+1321
-1359
lines changed

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<!--GraphQL-->
1919
<GraphQL_Server_Version>5.0.2</GraphQL_Server_Version>
2020
<GraphQL_Client_Version>3.2.3</GraphQL_Client_Version>
21-
<GraphQL_Version>4.5.0</GraphQL_Version>
21+
<GraphQL_Version>4.4.0</GraphQL_Version>
2222

2323
<!--AutoMapper-->
2424
<AutoMapper_DependencyInjection_Version>8.1.1</AutoMapper_DependencyInjection_Version>
@@ -31,7 +31,7 @@
3131
<HealthChecks_Version>5.0.1</HealthChecks_Version>
3232

3333
<!--Others-->
34-
<FluentValidation_Version>10.1.0</FluentValidation_Version>
34+
<FluentValidation_Version>10.0.4</FluentValidation_Version>
3535
<Scrutor_Version>3.3.0</Scrutor_Version>
3636

3737
</PropertyGroup>

src/Dotnet6.GraphQL4.Repositories.Abstractions/DependencyInjection/Extensions/ServiceCollectionExtensions.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System.Transactions;
21
using Dotnet6.GraphQL4.CrossCutting;
32
using Dotnet6.GraphQL4.Repositories.Abstractions.DependencyInjection.Options;
43
using Dotnet6.GraphQL4.Repositories.Abstractions.UnitsOfWork;
@@ -22,10 +21,12 @@ public static IServiceCollection AddRepositories(this IServiceCollection service
2221
public static IServiceCollection AddUnitOfWork(this IServiceCollection services)
2322
=> services.AddScoped<IUnitOfWork, UnitOfWork>();
2423

25-
public static OptionsBuilder<ApplicationTransactionOptions> ConfigureTransactionOptions(this IServiceCollection services, IConfigurationSection section)
24+
public static OptionsBuilder<TransactionOptions> ConfigureTransactionOptions(this IServiceCollection services, IConfigurationSection section)
2625
=> services
27-
.AddOptions<ApplicationTransactionOptions>()
26+
.AddOptions<TransactionOptions>()
2827
.Bind(section)
29-
.Validate(options => options.IsolationLevel is not IsolationLevel.Unspecified);
28+
.Validate(
29+
validation: options => options.IsolationLevel is not System.Transactions.IsolationLevel.Unspecified,
30+
failureMessage: "Transaction isolation level must be specified");
3031
}
3132
}

src/Dotnet6.GraphQL4.Repositories.Abstractions/DependencyInjection/Options/ApplicationTransactionOptions.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Transactions;
2+
3+
namespace Dotnet6.GraphQL4.Repositories.Abstractions.DependencyInjection.Options
4+
{
5+
public class TransactionOptions
6+
{
7+
private const IsolationLevel DefaultIsolationLevel = IsolationLevel.ReadCommitted;
8+
private IsolationLevel? _isolationLevel;
9+
10+
public IsolationLevel IsolationLevel
11+
{
12+
get => _isolationLevel ?? DefaultIsolationLevel;
13+
set => _isolationLevel = value;
14+
}
15+
}
16+
}

src/Dotnet6.GraphQL4.Repositories.Abstractions/UnitsOfWork/UnitOfWork.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ public class UnitOfWork : IUnitOfWork
1515
{
1616
private readonly DatabaseFacade _database;
1717
private readonly DbContext _dbContext;
18-
private readonly ApplicationTransactionOptions _options;
18+
private readonly TransactionOptions _options;
1919
private readonly INotificationContext _notificationContext;
2020

2121
public UnitOfWork(
2222
DbContext dbContext,
23-
IOptionsSnapshot<ApplicationTransactionOptions> optionsMonitor,
23+
IOptionsSnapshot<TransactionOptions> optionsMonitor,
2424
INotificationContext notificationContext)
2525
{
2626
_dbContext = dbContext;

src/Dotnet6.GraphQL4.Store.Repositories/Migrations/20210310173753_First migration.Designer.cs

Lines changed: 0 additions & 741 deletions
This file was deleted.

src/Dotnet6.GraphQL4.Store.Repositories/Migrations/20210310173753_First migration.cs

Lines changed: 0 additions & 223 deletions
This file was deleted.

src/Dotnet6.GraphQL4.Store.Repositories/Migrations/20210502214215_First migration.Designer.cs

Lines changed: 741 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Dotnet6.GraphQL4.Store.Repositories/Migrations/20210502214215_First migration.cs

Lines changed: 180 additions & 0 deletions
Large diffs are not rendered by default.

src/Dotnet6.GraphQL4.Store.Repositories/Migrations/StoreDbContextModelSnapshot.cs

Lines changed: 367 additions & 366 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)