use database with web api.