Ohne Syncfusion

This commit is contained in:
2023-04-11 19:09:28 +02:00
parent d9e3fdb793
commit c4fd240f59
10 changed files with 107 additions and 107 deletions

View File

@@ -11,5 +11,6 @@ namespace SewerStammGen.Shared.Contracts
public interface ISchachtDataService : IDataService<Schacht>
{
Task<IEnumerable<Schacht>> GetAll(int projektID);
Task<Schacht> GetSchachtByNameAndProjekt(string name, int projektID);
}
}

View File

@@ -10,5 +10,6 @@ namespace SewerStammGen.Shared.Contracts
public interface ISchachtService
{
Task<Schacht> CreateSchacht(Projekt proj);
Task<Schacht> FindSchachtByNameAndProjektID(string name, int projektID);
}
}

View File

@@ -12,10 +12,15 @@ namespace SewerStammGen.Shared.Services
public class SchachtService : ISchachtService
{
private readonly IDataService<Projekt> _projectService;
private readonly ISchachtDataService _schachtDataService;
public SchachtService(IDataService<Projekt> projectService)
public SchachtService(
IDataService<Projekt> projectService,
ISchachtDataService schachtDataService
)
{
_projectService = projectService;
_schachtDataService = schachtDataService;
}
public async Task<Schacht> CreateSchacht(Projekt proj)
@@ -27,5 +32,13 @@ namespace SewerStammGen.Shared.Services
await _projectService.Update(proj.Id, proj);
return schacht;
}
public async Task<Schacht> FindSchachtByNameAndProjektID(string name, int projektID)
{
Schacht result = await _schachtDataService.GetSchachtByNameAndProjekt(name, projektID);
return result;
}
}
}