コード例 #1
0
        public int UpdatePet(Pet_x pet)
        {
            string UID  = CheckJWT(WebOperationContext.Current);
            var    user = repository.GetUserByUID(UID);

            if (user.Id != pet.UserId)
            {
                throw new Exception("UidProvideUserDontMachWithAuthUid");
            }

            return(repository.UpdatePet(pet));
        }