Interktion im WPF erweitert

This commit is contained in:
HuskyTeufel
2021-09-22 16:26:56 +02:00
parent efa52c117c
commit e23f898f14
48 changed files with 1946 additions and 88 deletions

View File

@@ -25,6 +25,11 @@ namespace DaSaSo.EntityFramework.Services
return await _nonQueryDataService.Create(entity);
}
public Buildingsite CreateNonAsync(Buildingsite entity)
{
throw new NotImplementedException();
}
public async Task<bool> Delete(int id)
{
return await _nonQueryDataService.Delete(id);

View File

@@ -27,6 +27,11 @@ namespace DaSaSo.EntityFramework.Services
return await _nonQueryDataService.Create(entity);
}
public Client CreateNonAsync(Client entity)
{
throw new NotImplementedException();
}
public async Task<bool> Delete(int id)
{
return await _nonQueryDataService.Delete(id);

View File

@@ -27,6 +27,16 @@ namespace DaSaSo.EntityFramework.Services.Common
}
}
public T CreateNonAsync(T entity)
{
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())
{
EntityEntry<T> createdEntity = context.Set<T>().Add(entity);
context.SaveChanges();
return createdEntity.Entity;
}
}
public async Task<bool> Delete(int id)
{
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())

View File

@@ -27,6 +27,11 @@ namespace DaSaSo.EntityFramework.Services
return await _nonQueryDataService.Create(entity);
}
public T CreateNonAsync(T entity)
{
return _nonQueryDataService.CreateNonAsync(entity);
}
public async Task<bool> Delete(int id)
{
return await _nonQueryDataService.Delete(id);
@@ -56,6 +61,11 @@ namespace DaSaSo.EntityFramework.Services
{
return await _nonQueryDataService.Update(id, entity);
}
T IDataService<T>.CreateNonAsync(T entity)
{
return _nonQueryDataService.CreateNonAsync(entity);
}
}
}

View File

@@ -56,5 +56,10 @@ namespace DaSaSo.EntityFramework.Services
{
return await _nonQueryDataService.Update(id, entity);
}
public Project CreateNonAsync(Project entity)
{
return _nonQueryDataService.CreateNonAsync(entity);
}
}
}

View File

@@ -26,6 +26,11 @@ namespace DaSaSo.EntityFramework.Services
return await _nonQueryDataService.Create(entity);
}
public SewerObject CreateNonAsync(SewerObject entity)
{
return _nonQueryDataService.CreateNonAsync(entity);
}
public async Task<bool> Delete(int id)
{
return await _nonQueryDataService.Delete(id);