Ohne Syncfusion
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,5 +10,6 @@ namespace SewerStammGen.Shared.Contracts
|
||||
public interface ISchachtService
|
||||
{
|
||||
Task<Schacht> CreateSchacht(Projekt proj);
|
||||
Task<Schacht> FindSchachtByNameAndProjektID(string name, int projektID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user