public static void Destroy(LightLoanDbContext dbContext)
 {
     dbContext.Database.EnsureDeleted();
     dbContext.Dispose();
 }
Esempio n. 2
0
        /*[TestMethod]
         * public async Task SaveChangesAsync_Should_Set_Modified_Properties_and_Status_on_Entity_Deleted()
         * {
         *  //Arrange
         *  Branch thisBranch= await _dbContext.Branches.FindAsync(testId);
         *  //Act
         *  _dbContext.Branches.Remove(thisBranch);
         *  await _dbContext.SaveChangesAsync();
         *  //Assert
         *  thisBranch.LastModifiedBy.ShouldNotBeNull();
         *  thisBranch.LastModifiedDate.ShouldBe(dateTime.Date);
         *  thisBranch.LastModifiedDateTime.ShouldBe(dateTime);
         * }*/

        public void Dispose()
        {
            _dbContext?.Dispose();
        }