Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit eb859cb

Browse files
committed
Ready to migrations
1 parent b3d4dea commit eb859cb

30 files changed

Lines changed: 78 additions & 1696 deletions

src/Backend/Jp.Domain.Core/Jp.Domain.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<ItemGroup>
88
<PackageReference Include="mediatr" Version="4.1.0" />
9-
<PackageReference Include="FluentValidation" Version="8.0.0" />
9+
<PackageReference Include="FluentValidation" Version="8.1.3" />
1010
</ItemGroup>
1111

1212
</Project>

src/Backend/Jp.Domain/Jp.Domain.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="FluentValidation" Version="8.0.0" />
13+
<PackageReference Include="FluentValidation" Version="8.1.3" />
1414
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.1.1" />
1515
</ItemGroup>
1616

src/Backend/Jp.Infra.CrossCutting.Identity/Context/ApplicationDbContext.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
using System;
2-
using System.IO;
3-
using System.Threading.Tasks;
4-
using Jp.Infra.CrossCutting.Identity.Constants;
1+
using Jp.Infra.CrossCutting.Identity.Constants;
52
using Jp.Infra.CrossCutting.Identity.Entities.Identity;
63
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
74
using Microsoft.EntityFrameworkCore;
8-
using Microsoft.Extensions.Configuration;
5+
using System;
6+
using System.Threading.Tasks;
97

108
namespace Jp.Infra.CrossCutting.Identity.Context
119
{

src/Backend/Jp.Infra.CrossCutting.IoC/RepositoryBootStrapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public static void RegisterServices(IServiceCollection services)
2828
services.AddScoped<JpContext>();
2929

3030
// Infra - Data EventSourcing
31-
services.AddScoped<IEventStoreRepository, EventStoreSQLRepository>();
31+
services.AddScoped<IEventStoreRepository, EventStoreRepository>();
3232
services.AddScoped<IEventStore, SqlEventStore>();
33-
services.AddScoped<EventStoreSQLContext>();
33+
services.AddScoped<EventStoreContext>();
3434
}
3535
}
3636
}

src/Backend/Jp.Infra.Data/Context/EventStoreSQLContext.cs renamed to src/Backend/Jp.Infra.Data/Context/EventStoreContext.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
using System.IO;
2-
using Jp.Domain.Core.Events;
1+
using Jp.Domain.Core.Events;
32
using Jp.Infra.Data.Mappings;
43
using Microsoft.EntityFrameworkCore;
5-
using Microsoft.Extensions.Configuration;
64

75
namespace Jp.Infra.Data.Context
86
{
9-
public class EventStoreSQLContext : DbContext
7+
public class EventStoreContext : DbContext
108
{
119
public DbSet<StoredEvent> StoredEvent { get; set; }
12-
public EventStoreSQLContext(DbContextOptions<EventStoreSQLContext> options) : base(options) {}
10+
public EventStoreContext(DbContextOptions<EventStoreContext> options) : base(options) { }
1311

1412
protected override void OnModelCreating(ModelBuilder modelBuilder)
1513
{

src/Backend/Jp.Infra.Data/Context/JpContext.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
using System.Threading.Tasks;
2-
using IdentityServer4.EntityFramework.Entities;
1+
using IdentityServer4.EntityFramework.Entities;
32
using IdentityServer4.EntityFramework.Extensions;
43
using IdentityServer4.EntityFramework.Interfaces;
5-
using IdentityServer4.EntityFramework.Mappers;
64
using IdentityServer4.EntityFramework.Options;
75
using Microsoft.EntityFrameworkCore;
6+
using System.Threading.Tasks;
87

98
namespace Jp.Infra.Data.Context
109
{

src/Backend/Jp.Infra.Data/Repository/EventSourcing/EventStoreSQLRepository.cs renamed to src/Backend/Jp.Infra.Data/Repository/EventSourcing/EventStoreRepository.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
namespace Jp.Infra.Data.Repository.EventSourcing
1111
{
12-
public class EventStoreSQLRepository : IEventStoreRepository
12+
public class EventStoreRepository : IEventStoreRepository
1313
{
14-
private readonly EventStoreSQLContext _context;
14+
private readonly EventStoreContext _context;
1515

16-
public EventStoreSQLRepository(EventStoreSQLContext context)
16+
public EventStoreRepository(EventStoreContext context)
1717
{
1818
_context = context;
1919
}

src/Backend/Jp.Infra.Migrations.MySql.Identity/Configuration/IdentityConfig.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
using System;
2-
using System.Reflection;
3-
using IdentityServer4.EntityFramework.Options;
1+
using IdentityServer4.EntityFramework.Options;
42
using Jp.Infra.CrossCutting.Identity.Context;
53
using Jp.Infra.CrossCutting.Identity.Entities.Identity;
6-
using Jp.Infra.Data.Context;
74
using Microsoft.AspNetCore.Identity;
85
using Microsoft.EntityFrameworkCore;
96
using Microsoft.Extensions.Configuration;
107
using Microsoft.Extensions.DependencyInjection;
8+
using System;
9+
using System.Reflection;
10+
using Jp.Infra.Data.Context;
1111

12-
namespace Jp.Infra.Migrations.MySql.Identity.Configuration
12+
namespace Jp.Infra.Migrations.MySql.Configuration
1313
{
1414
public static class IdentityConfig
1515
{
@@ -26,7 +26,7 @@ public static IServiceCollection AddIdentityMySql(this IServiceCollection servic
2626

2727
services.AddEntityFrameworkMySql().AddDbContext<ApplicationDbContext>(options => options.UseMySql(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly)));
2828
services.AddDbContext<JpContext>(options => options.UseMySql(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly)));
29-
services.AddDbContext<EventStoreSQLContext>(options => options.UseMySql(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly)));
29+
services.AddDbContext<EventStoreContext>(options => options.UseMySql(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly)));
3030

3131
services.AddIdentity<UserIdentity, UserIdentityRole>()
3232
.AddEntityFrameworkStores<ApplicationDbContext>()

src/Backend/Jp.Infra.Migrations.MySql.Identity/Jp.Infra.Migrations.MySql.Identity.csproj renamed to src/Backend/Jp.Infra.Migrations.MySql.Identity/Jp.Infra.Migrations.MySql.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>netstandard2.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
8+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.4" />
9+
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.1.4" />
810
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.2" />
911
</ItemGroup>
1012

1113
<ItemGroup>
12-
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.3" />
14+
<ProjectReference Include="..\Jp.Infra.CrossCutting.Identity\Jp.Infra.CrossCutting.Identity.csproj" />
15+
<ProjectReference Include="..\Jp.Infra.Data\Jp.Infra.Data.csproj" />
1316
</ItemGroup>
1417

1518
<ItemGroup>
16-
<ProjectReference Include="..\Jp.Infra.CrossCutting.Identity\Jp.Infra.CrossCutting.Identity.csproj" />
17-
<ProjectReference Include="..\Jp.Infra.Data\Jp.Infra.Data.csproj" />
19+
<Reference Include="Jp.Infra.Data">
20+
<HintPath>bin\Debug\netcoreapp2.1\Jp.Infra.Data.dll</HintPath>
21+
</Reference>
22+
</ItemGroup>
23+
24+
<ItemGroup>
25+
<Folder Include="Migrations\" />
1826
</ItemGroup>
1927

2028
</Project>

src/Backend/Jp.Infra.Migrations.MySql.Identity/Migrations/Application/20180905193156_Initial.Designer.cs

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

0 commit comments

Comments
 (0)