public void Dispose() { if (_aplicationContext is not null) { _aplicationContext.Dispose(); GC.SuppressFinalize(this); } }
public virtual void Dispose(bool disposing) { if (!disposed) { if (disposing) { db.Dispose(); userManager.Dispose(); roleManager.Dispose(); } disposed = true; } }
public void Destroy(AplicationContext context) { context.Database.EnsureDeleted(); context.Dispose(); }