This commit is contained in:
Jöran Malek 2024-02-26 18:08:18 +01:00
parent b1d3ec73c9
commit 693d12b61c
35 changed files with 389 additions and 269 deletions

View file

@ -24,6 +24,15 @@ public sealed class Workspace : IDisposable
_dbContextFactory = Services.GetRequiredService<IDbContextFactory<NoteDbContext>>();
}
// public Note AddNote(Note? parent)
// {
// }
public T CreateViewModel<T>()
{
return TypeFactory.Create<T>(Services);
}
public void Dispose()
{
Dispose(disposing: true);
@ -34,10 +43,7 @@ public sealed class Workspace : IDisposable
{
if (!_disposedValue)
{
{
_scope!.Dispose();
}
_scope!.Dispose();
_scope = null;
_disposedValue = true;
}