Ohne Syncfusion
This commit is contained in:
@@ -46,6 +46,7 @@ namespace SewerStammGen.EntityFramework.Services.Common
|
||||
{
|
||||
using SewerStammGenDbContext context = _contextFactory.CreateDbContext();
|
||||
entity.Id = id;
|
||||
|
||||
context.Set<T>().Update(entity);
|
||||
await context.SaveChangesAsync();
|
||||
return entity;
|
||||
|
||||
@@ -55,6 +55,15 @@ namespace SewerStammGen.EntityFramework.Services
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<Schacht> GetSchachtByNameAndProjekt(string name, int projektID)
|
||||
{
|
||||
using(SewerStammGenDbContext context = _contextFactory.CreateDbContext())
|
||||
{
|
||||
Schacht entity = await context.Set<Schacht>().Where(x => x.Projekt.Id.Equals(projektID) && x.Objektbezeichnung.Equals(name)).FirstOrDefaultAsync();
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<Schacht> Update(int id, Schacht entity)
|
||||
{
|
||||
return await _nonQueryDataService.Update(id, entity);
|
||||
|
||||
Reference in New Issue
Block a user