sample of generate entity from database