Interktion im WPF erweitert
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user