Exemple #1
0
 /// <inheritdoc />
 public void Dispose()
 {
     if (context != null)
     {
         context.Dispose();
         context = null;
     }
 }
Exemple #2
0
 /// <inheritdoc />
 public void Dispose()
 {
     if (dataContext != null)
     {
         dataContext.Dispose();
         dataContext = null;
     }
 }
Exemple #3
0
        /// <inheritdoc />
        public Task InitializeDatabaseAsync()
        {
            if (dataContext == null)
            {
                dataContext = new CashDeskDbContext();
                return(Task.CompletedTask);
            }

            throw new InvalidOperationException();
        }
Exemple #4
0
        /// <inheritdoc />
        public Task InitializeDatabaseAsync()
        {
            if (context == null)
            {
                throw new InvalidOperationException("You have already initialized it");
            }

            context = new CashDeskDbContext();
            return(Task.CompletedTask);
        }