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

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

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