put entity into db