public Task <int> Put(int id, [FromBody] ContentIdDto item2)
        {
            Console.WriteLine("token" + item2.TokenString);

            var contentDetailsUpdate = _mapper.Map <UserContentDetails>(item2);

            AuthenticationTokenClass AuthenticationTokenClassObjRef = new AuthenticationTokenClass();

            TokenDto tokendto         = new TokenDto();
            string   tokenref         = AuthenticationTokenClassObjRef.AuthenticationToken(tokendto).Result;
            object   jsonObject       = JsonConvert.DeserializeObject(tokenref);
            var      ParsedJsonObject = JObject.Parse(tokenref);
            string   tokenserver      = ParsedJsonObject["tokenstored"].ToString();
            dynamic  dynJson          = JsonConvert.DeserializeObject(tokenserver);

            foreach (var item in dynJson)
            {
                String tokenstored = item.tokenstored;

                if (item2.TokenString == tokenstored)
                {
                    try
                    {
                        return(_service.Update(id, contentDetailsUpdate)); // Service used for updation.
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
                }
            }

            return(null);
        }
 public Task <int> Put(int id, [FromBody] UserContentDetails item)
 {
     return(_service.Update(id, item));
 }