Extracted Delete() to database.