added static constructor for directly creating an entity from a request