/// <inheritdoc /> public void Dispose() { if (context != null) { context.Dispose(); context = null; } }
/// <inheritdoc /> public void Dispose() { if (dataContext != null) { dataContext.Dispose(); dataContext = null; } }
/// <inheritdoc /> public Task InitializeDatabaseAsync() { if (dataContext == null) { dataContext = new CashDeskDbContext(); return(Task.CompletedTask); } throw new InvalidOperationException(); }
/// <inheritdoc /> public Task InitializeDatabaseAsync() { if (context == null) { throw new InvalidOperationException("You have already initialized it"); } context = new CashDeskDbContext(); return(Task.CompletedTask); }