/// <inheritdoc />
 public async Task InitializeDatabaseAsync()
 {
     if (context != null)
     {
         throw new InvalidOperationException();
     }
     context = new CashDeskContext();
 }
Example #2
0
 /// <inheritdoc />
 public void Dispose()
 {
     if (dataContext != null)
     {
         dataContext.Dispose();
         dataContext = null;
     }
 }
Example #3
0
 /// <inheritdoc />
 public void Dispose()
 {
     if (_context != null)
     {
         _context.Dispose();
         _context = null;
     }
 }
Example #4
0
        /// <inheritdoc />
        public Task InitializeDatabaseAsync()
        {
            IsContextValid();

            context = new CashDeskContext();
            // return context.SaveChanges();
            return(Task.CompletedTask); // from your code
        }
Example #5
0
        /// <inheritdoc />
        public Task InitializeDatabaseAsync()
        {
            if (_context != null)
            {
                throw new InvalidOperationException("Already initialised");
            }

            _context = new CashDeskContext();
            return(Task.CompletedTask);
        }