there should be a server side entity service to use, instead of doing the db directly.