Set the core.database method to get context in all method