Skip to content

Commit

Permalink
Merge pull request #15 from IliyanIlievPH/14
Browse files Browse the repository at this point in the history
Closes #14
  • Loading branch information
PaterSantyago authored Jul 20, 2020
2 parents 7e6b006 + 34a6827 commit 8248d46
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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 @@ -15,8 +15,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<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="Refit" Version="4.6.107" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="Lykke.RabbitMqBroker" Version="7.13.1" />
<PackageReference Include="Lykke.RabbitMqBroker" Version="7.13.3" />
<PackageReference Include="MAVN.Service.NotificationSystemAdapter.Client" Version="1.1.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Autofac;
using MAVN.Common.MsSql;
using Autofac;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.NotificationSystem.Domain.Repositories;

namespace MAVN.Service.NotificationSystem.MsSqlRepositories
Expand All @@ -15,7 +15,7 @@ public AutofacModule(string connectionString)

protected override void Load(ContainerBuilder builder)
{
builder.RegisterMsSql(
builder.RegisterPostgreSQL(
_connectionString,
connString => new NotificationSystemContext(connString, false),
dbConn => new NotificationSystemContext(dbConn));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="MAVN.Common.MsSql" Version="3.0.0" />
<PackageReference Include="MAVN.Persistence.PostgreSQL.Legacy" Version="1.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MAVN.Service.NotificationSystem.Domain\MAVN.Service.NotificationSystem.Domain.csproj" />
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.NotificationSystem.MsSqlRepositories.Entities;
using Microsoft.EntityFrameworkCore;

namespace MAVN.Service.NotificationSystem.MsSqlRepositories
{
public class NotificationSystemContext : MsSqlContext
public class NotificationSystemContext : PostgreSQLContext
{
private const string Schema = "notification_system";

Expand Down Expand Up @@ -34,7 +34,7 @@ public NotificationSystemContext(DbConnection dbConnection)
{
}

protected override void OnLykkeModelCreating(ModelBuilder modelBuilder)
protected override void OnMAVNModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<TemplateEntity>().HasIndex(x => x.Name).IsUnique();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MAVN.Common.MsSql;
using MAVN.Persistence.PostgreSQL.Legacy;
using MAVN.Service.NotificationSystem.Domain.Models;
using MAVN.Service.NotificationSystem.Domain.Repositories;
using MAVN.Service.NotificationSystem.MsSqlRepositories.Entities;
Expand All @@ -11,9 +11,9 @@ namespace MAVN.Service.NotificationSystem.MsSqlRepositories
{
public class TemplateRepository : ITemplateRepository
{
private readonly MsSqlContextFactory<NotificationSystemContext> _msSqlContextFactory;
private readonly PostgreSQLContextFactory<NotificationSystemContext> _msSqlContextFactory;

public TemplateRepository(MsSqlContextFactory<NotificationSystemContext> msSqlContextFactory)
public TemplateRepository(PostgreSQLContextFactory<NotificationSystemContext> msSqlContextFactory)
{
_msSqlContextFactory = msSqlContextFactory;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
Expand All @@ -15,7 +15,6 @@ namespace MAVN.Service.NotificationSystem.Controllers
/// <summary>
/// NotificationSystem client API interface for work with templates.
/// </summary>
[ApiVersion("1.0")]
[Route("/api/templates")]
[ApiController]
[Produces("application/json")]
Expand Down
2 changes: 1 addition & 1 deletion src/MAVN.Service.NotificationSystem/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM microsoft/dotnet:2.2-aspnetcore-runtime
FROM microsoft/dotnet:3.1-aspnetcore-runtime
WORKDIR /app
COPY . .
ENTRYPOINT ["dotnet", "MAVN.Service.NotificationSystem.dll"]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<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 @@ -24,11 +24,8 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="9.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Lykke.Common.ApiLibrary" Version="2.4.2" />
<PackageReference Include="Lykke.Sdk" Version="5.17.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="3.1.2" />
<PackageReference Include="Lykke.Logs" Version="7.4.0" />
<PackageReference Include="Lykke.Sdk" Version="5.18.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\client\MAVN.Service.NotificationSystem.Client\MAVN.Service.NotificationSystem.Client.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>1.0.0</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.11.0" />
<PackageReference Include="AutoFixture" Version="4.12.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="7.0.0" />
<PackageReference Include="coverlet.msbuild" Version="2.8.1">
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<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</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 8248d46

Please sign in to comment.