Skip to content

Commit

Permalink
Merge pull request #12 from IliyanIlievPH/11
Browse files Browse the repository at this point in the history
Closes #11
  • Loading branch information
PaterSantyago committed Jul 20, 2020
2 parents c001b8d + 87157ce commit bf98310
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.207
dotnet-version: 3.1.302
- name: Install dependencies
run: dotnet restore
- name: Build solution
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.207
dotnet-version: 3.1.302
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<None Remove="MAVN.Service.QuorumOperationExecutor.Client.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lykke.HttpClientGenerator" Version="2.5.0" />
<PackageReference Include="Lykke.SettingsReader" Version="5.2.0" />
<PackageReference Include="Lykke.HttpClientGenerator" Version="3.1.0" />
<PackageReference Include="Lykke.SettingsReader" Version="5.3.0" />
<PackageReference Include="MAVN.Numerics" Version="1.0.0" />
<PackageReference Include="Refit" Version="4.6.107" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.0.0</Version>
Expand All @@ -11,10 +11,10 @@
<PackageReference Include="MAVN.PrivateBlockchain.CustomerRegistry" Version="1.0.0-beta.1" />
<PackageReference Include="MAVN.PrivateBlockchain.MVNGateway" Version="1.0.0-beta.1" />
<PackageReference Include="LykkeBiz.Nethereum.Extension" Version="1.0.11" />
<PackageReference Include="MAVN.Service.PrivateBlockchainFacade.Client" Version="1.0.1" />
<PackageReference Include="MAVN.Service.PrivateBlockchainFacade.Contract" Version="1.0.1" />
<PackageReference Include="MAVN.Service.PrivateBlockchainFacade.Client" Version="1.1.0" />
<PackageReference Include="MAVN.Service.PrivateBlockchainFacade.Contract" Version="1.1.0" />
<PackageReference Include="MAVN.Service.QuorumTransactionSigner.Client" Version="1.0.1" />
<PackageReference Include="Nethereum.JsonRpc.WebSocketClient" Version="3.6.0" />
<PackageReference Include="Nethereum.JsonRpc.WebSocketClient" Version="3.7.1" />
<PackageReference Include="Nethereum.Web3" Version="3.7.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Data.Common;
using System.Data.Common;
using JetBrains.Annotations;
using MAVN.Common.MsSql;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.QuorumOperationExecutor.MsSqlRepositories.Entities;
using Microsoft.EntityFrameworkCore;

namespace MAVN.Service.QuorumOperationExecutor.MsSqlRepositories.Contexts
{
public class QoeContext : MsSqlContext
public class QoeContext : PostgreSQLContext
{
private const string Schema = "quorum_operation_executor";

Expand All @@ -29,7 +29,7 @@ public QoeContext(DbConnection dbConnection)
{
}

protected override void OnLykkeModelCreating(
protected override void OnMAVNModelCreating(
ModelBuilder modelBuilder)
{
modelBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MAVN.Common.MsSql" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.2.0" />
<PackageReference Include="Lykke.Logs" Version="7.4.0" />
<PackageReference Include="MAVN.Persistence.PostgreSQL.Legacy" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MAVN.Service.QuorumOperationExecutor.Domain\MAVN.Service.QuorumOperationExecutor.Domain.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Transactions;
using MAVN.Common.MsSql;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.QuorumOperationExecutor.Domain.Repositories;
using MAVN.Service.QuorumOperationExecutor.MsSqlRepositories.Contexts;
using MAVN.Service.QuorumOperationExecutor.MsSqlRepositories.Entities;
Expand All @@ -14,9 +14,9 @@ namespace MAVN.Service.QuorumOperationExecutor.MsSqlRepositories
{
public class OperationRepository : IOperationRepository
{
private readonly MsSqlContextFactory<QoeContext> _contextFactory;
private readonly PostgreSQLContextFactory<QoeContext> _contextFactory;

public OperationRepository(MsSqlContextFactory<QoeContext> contextFactory)
public OperationRepository(PostgreSQLContextFactory<QoeContext> contextFactory)
{
_contextFactory = contextFactory;
}
Expand Down
2 changes: 1 addition & 1 deletion src/MAVN.Service.QuorumOperationExecutor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
COPY . .
ENTRYPOINT ["dotnet", "MAVN.Service.QuorumOperationExecutor.dll"]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputType>Exe</OutputType>
<Version>1.0.0</Version>
</PropertyGroup>
Expand All @@ -13,12 +13,15 @@
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<None Update="appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Dockerfile">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lykke.Sdk" Version="5.16.0" />
<PackageReference Include="Lykke.Sdk" Version="5.18.0" />
<PackageReference Include="LykkeBiz.Logs.Nethereum" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Autofac;
using Autofac;
using JetBrains.Annotations;
using MAVN.Common.MsSql;
using MAVN.Service.QuorumOperationExecutor.Domain.Repositories;
using MAVN.Service.QuorumOperationExecutor.MsSqlRepositories;
using MAVN.Service.QuorumOperationExecutor.MsSqlRepositories.Contexts;
using MAVN.Service.QuorumOperationExecutor.Settings;
using Lykke.SettingsReader;
using MAVN.Persistence.PostgreSQL.Legacy;

namespace MAVN.Service.QuorumOperationExecutor.Modules
{
Expand All @@ -24,15 +24,15 @@ public class RepositoriesModule : Module
ContainerBuilder builder)
{
builder
.RegisterMsSql(
.RegisterPostgreSQL(
_dbSettings.DataConnString,
connString => new QoeContext(connString, false),
dbConn => new QoeContext(dbConn));

builder
.Register(ctx => new OperationRepository
(
ctx.Resolve<MsSqlContextFactory<QoeContext>>()
ctx.Resolve<PostgreSQLContextFactory<QoeContext>>()
))
.As<IOperationRepository>()
.SingleInstance();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.8.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\MAVN.Service.QuorumOperationExecutor\MAVN.Service.QuorumOperationExecutor.csproj" />
Expand Down

0 comments on commit bf98310

Please sign in to comment.