Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed PersonsApi logic #673

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 0 additions & 88 deletions .github/workflows/build-and-push-package.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
using Dfe.Academies.Application.Common.Interfaces;
using Dfe.Academies.Domain.Constituencies;
using Dfe.Academies.Domain.Interfaces.Repositories;
using Dfe.Academies.Infrastructure;
using Dfe.Academies.Infrastructure.Repositories;
using Dfe.Academies.Infrastructure.Security.Authorization;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Dfe.Academies.Domain.Interfaces.Repositories;
using Dfe.Academies.Infrastructure.QueryServices;
using Dfe.Academies.Domain.ValueObjects;

namespace Microsoft.Extensions.DependencyInjection
{
Expand Down Expand Up @@ -39,41 +34,6 @@ public static IServiceCollection AddInfrastructureDependencyGroup(
return services;
}

public static IServiceCollection AddPersonsApiInfrastructureDependencyGroup(
this IServiceCollection services, IConfiguration config)
{
//Repos
services.AddScoped<ITrustRepository, TrustRepository>();
services.AddScoped<IEstablishmentRepository, EstablishmentRepository>();
services.AddScoped<IConstituencyRepository, ConstituencyRepository>();

// Query Services
services.AddScoped<IEstablishmentQueryService, EstablishmentQueryService>();
services.AddScoped<ITrustQueryService, TrustQueryService>();

//Cache service
services.AddServiceCaching(config);

//Db
var connectionString = config.GetConnectionString("DefaultConnection");

services.AddDbContext<MstrContext>(options =>
options.UseSqlServer(connectionString));

services.AddDbContext<MopContext>(options =>
options.UseSqlServer(connectionString));

services.AddDbContext<MisMstrContext>(options =>
options.UseSqlServer(connectionString));

AddInfrastructureHealthChecks(services);

// Authentication
services.AddCustomAuthorization(config);

return services;
}

public static void AddInfrastructureHealthChecks(this IServiceCollection services) {
services.AddHealthChecks()
.AddDbContextCheck<MstrContext>("Academies Database");
Expand Down
85 changes: 0 additions & 85 deletions Dfe.Academies.Api.Infrastructure/MopContext.cs

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading