diff --git a/src/api/NetworkResurrector.Api.Application/Queries/GetMachines.cs b/src/api/NetworkResurrector.Api.Application/Queries/GetMachines.cs index a85be62..2520f4c 100644 --- a/src/api/NetworkResurrector.Api.Application/Queries/GetMachines.cs +++ b/src/api/NetworkResurrector.Api.Application/Queries/GetMachines.cs @@ -26,10 +26,10 @@ namespace NetworkResurrector.Api.Application.Queries public class QueryHandler : IRequestHandler { - private readonly IAgentRepository _repository; + private readonly INetworkRepository _repository; private readonly IMapper _mapper; - public QueryHandler(IAgentRepository repository, IMapper mapper) + public QueryHandler(INetworkRepository repository, IMapper mapper) { _repository = repository; _mapper = mapper; diff --git a/src/api/NetworkResurrector.Api.Domain.Data/DbContexts/AgentDbContext.cs b/src/api/NetworkResurrector.Api.Domain.Data/DbContexts/NetworkDbContext.cs similarity index 85% rename from src/api/NetworkResurrector.Api.Domain.Data/DbContexts/AgentDbContext.cs rename to src/api/NetworkResurrector.Api.Domain.Data/DbContexts/NetworkDbContext.cs index 60669c1..daa9e7e 100644 --- a/src/api/NetworkResurrector.Api.Domain.Data/DbContexts/AgentDbContext.cs +++ b/src/api/NetworkResurrector.Api.Domain.Data/DbContexts/NetworkDbContext.cs @@ -4,11 +4,11 @@ using NetworkResurrector.Api.Domain.Entities; namespace NetworkResurrector.Api.Domain.Data.DbContexts { - public class AgentDbContext : DbContext + public class NetworkDbContext : DbContext { public DbSet Machines { get; set; } - public AgentDbContext(DbContextOptions options) + public NetworkDbContext(DbContextOptions options) : base(options) { base.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.TrackAll; diff --git a/src/api/NetworkResurrector.Api.Domain.Data/DependencyInjectionExtensions.cs b/src/api/NetworkResurrector.Api.Domain.Data/DependencyInjectionExtensions.cs index 00380bf..91c2194 100644 --- a/src/api/NetworkResurrector.Api.Domain.Data/DependencyInjectionExtensions.cs +++ b/src/api/NetworkResurrector.Api.Domain.Data/DependencyInjectionExtensions.cs @@ -11,10 +11,10 @@ namespace NetworkResurrector.Api.Domain.Data { public static void AddDataAccess(this IServiceCollection services) { - services.AddScoped(); + services.AddScoped(); services - .AddDbContextPool( + .AddDbContextPool( (serviceProvider, options) => { var configuration = serviceProvider.GetService(); diff --git a/src/api/NetworkResurrector.Api.Domain.Data/Repositories/AgentRepository.cs b/src/api/NetworkResurrector.Api.Domain.Data/Repositories/NetworkRepository.cs similarity index 74% rename from src/api/NetworkResurrector.Api.Domain.Data/Repositories/AgentRepository.cs rename to src/api/NetworkResurrector.Api.Domain.Data/Repositories/NetworkRepository.cs index ec48da7..c3949c9 100644 --- a/src/api/NetworkResurrector.Api.Domain.Data/Repositories/AgentRepository.cs +++ b/src/api/NetworkResurrector.Api.Domain.Data/Repositories/NetworkRepository.cs @@ -6,11 +6,11 @@ using System.Threading.Tasks; namespace NetworkResurrector.Api.Domain.Data.Repositories { - class AgentRepository : IAgentRepository + class NetworkRepository : INetworkRepository { - private readonly AgentDbContext _dbContext; + private readonly NetworkDbContext _dbContext; - public AgentRepository(AgentDbContext dbContext) + public NetworkRepository(NetworkDbContext dbContext) { _dbContext = dbContext; } diff --git a/src/api/NetworkResurrector.Api.Domain/Repositories/IAgentRepository.cs b/src/api/NetworkResurrector.Api.Domain/Repositories/INetworkRepository.cs similarity index 82% rename from src/api/NetworkResurrector.Api.Domain/Repositories/IAgentRepository.cs rename to src/api/NetworkResurrector.Api.Domain/Repositories/INetworkRepository.cs index b4fa21d..ba99ded 100644 --- a/src/api/NetworkResurrector.Api.Domain/Repositories/IAgentRepository.cs +++ b/src/api/NetworkResurrector.Api.Domain/Repositories/INetworkRepository.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; namespace NetworkResurrector.Api.Domain.Repositories { - public interface IAgentRepository + public interface INetworkRepository { Task GetMachines(); } diff --git a/src/api/NetworkResurrector.Api/Notes/Docker.txt b/src/api/NetworkResurrector.Api/Notes/Docker.txt index 8b05e01..5dfb8b6 100644 --- a/src/api/NetworkResurrector.Api/Notes/Docker.txt +++ b/src/api/NetworkResurrector.Api/Notes/Docker.txt @@ -6,7 +6,7 @@ Create image: docker image build -t "network-resurrector-api:1.0.0" -f "src/api/NetworkResurrector.Api/Dockerfile" . Run image: -docker run -p 5053:80 -it network-resurrector-agent:1.0.0 +docker run -p 5053:80 -it network-resurrector-api:1.0.0 Push image to registry: --tag image diff --git a/src/api/NetworkResurrector.Api/Startup.cs b/src/api/NetworkResurrector.Api/Startup.cs index 5e4a700..a707b4f 100644 --- a/src/api/NetworkResurrector.Api/Startup.cs +++ b/src/api/NetworkResurrector.Api/Startup.cs @@ -43,7 +43,7 @@ namespace NetworkResurrector.Api typeof(Application.Mappings.MappingProfile).Assembly); // Swagger - services.AddSwagger("NetworkResurrectorAgent API"); + services.AddSwagger("NetworkResurrector API"); // Data access services.AddDataAccess(); @@ -79,7 +79,7 @@ namespace NetworkResurrector.Api { endpoints.MapControllers(); }); - app.ConfigureSwagger("NetworkResurrectorAgent API"); + app.ConfigureSwagger("NetworkResurrector API"); } } }