diff --git a/SewerStammGen.DAL/Services/SchachtDataService.cs b/SewerStammGen.DAL/Services/SchachtDataService.cs new file mode 100644 index 0000000..c7978fe --- /dev/null +++ b/SewerStammGen.DAL/Services/SchachtDataService.cs @@ -0,0 +1,53 @@ +using Npgsql; +using SewerStammGen.Shared.Contracts; +using SewerStammGen.Shared.Domain; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SewerStammGen.DAL.Services +{ + public class SchachtDataService : PostgresqlDataService, ISchachtDataService + { + public SchachtDataService() : base("public.\"Schaechte\"") + { + } + + public Task Create(Schacht entity) + { + throw new NotImplementedException(); + } + + public Task Get(int id) + { + throw new NotImplementedException(); + } + + public Task> GetAll() + { + throw new NotImplementedException(); + } + + private Schacht parseSchacht(NpgsqlDataReader? reader) + { + throw new NotImplementedException(); + } + + public Task> GetAllByProjekt(int projektID) + { + throw new NotImplementedException(); + } + + public async Task> GetAllByProjekt(Projekt projekt) + { + return await GetAllByProjekt(projekt.Id); + } + + public Task Update(Schacht entity) + { + throw new NotImplementedException(); + } + } +} diff --git a/SewerStammGen/HostBuilders/AddServicesHostBuilderExtensions.cs b/SewerStammGen/HostBuilders/AddServicesHostBuilderExtensions.cs index c554b02..64af9c2 100644 --- a/SewerStammGen/HostBuilders/AddServicesHostBuilderExtensions.cs +++ b/SewerStammGen/HostBuilders/AddServicesHostBuilderExtensions.cs @@ -26,6 +26,7 @@ namespace SewerStammGen.HostBuilders services.AddSingleton>(); services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); }); diff --git a/Shared/Contracts/ISchachtDataService.cs b/Shared/Contracts/ISchachtDataService.cs index 4f6beed..cbc81f1 100644 --- a/Shared/Contracts/ISchachtDataService.cs +++ b/Shared/Contracts/ISchachtDataService.cs @@ -11,6 +11,7 @@ namespace SewerStammGen.Shared.Contracts { public interface ISchachtDataService : IDataService { - + Task> GetAllByProjekt(int projektID); + Task> GetAllByProjekt(Projekt projekt); } }