public UserProfile Update(UserProfile user)
        {
            try
            {
                _dac.Update(user);
            }
            catch (Exception err)
            {
                throw new Exception(Errors.ERR_PROFILEM_BADREQUEST, err);
            }

            return(user);
        }
Beispiel #2
0
        public Entity Update(Entity entity)
        {
            try
            {
                if (entity.isValid())
                {
                    _persist.Update(entity);
                }
                else
                {
                    throw new Exception(Error.ERR_REFM_ENTITY_NOT_VALID);
                }
            }
            catch (Exception err)
            {
                throw new Exception(Error.ERR_REFM_BADREQUEST, err);
            }

            return(entity);
        }