Sewerobject wird vollständig geladen

This commit is contained in:
HuskyTeufel
2021-09-27 10:19:11 +02:00
parent de9c12acef
commit d9f34cbf90
4 changed files with 86 additions and 21 deletions

View File

@@ -36,9 +36,13 @@ namespace DaSaSo.EntityFramework.Services
return await _nonQueryDataService.Delete(id);
}
public Task<SewerObject> Get(int id)
public async Task<SewerObject> Get(int id)
{
throw new NotImplementedException();
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())
{
SewerObject? s = await context.SewerObjects.Include("BuildingSite").FirstOrDefaultAsync((e) => e.Id == id);
return s;
}
}
public Task<IEnumerable<SewerObject>> GetAll()