public int CreatePet(Pet_x pet) { string UID = CheckJWT(WebOperationContext.Current); var user = repository.GetUserByUID(UID); if (user.UID != UID) { throw new Exception("UidProvideUserDontMachWithAuthUid"); } return(repository.CreatePet(pet)); }