Fix session usage in db_api

Update and create operations now use session.add method.

Change-Id: I848b60722569067114acaefa3e57a0b73a7fac82
Merge "Fix session usage in db_api"