public HttpResponseMessage Put([FromBody] ContactModel contactModel)
        {
            SaveEnum            SaveEnum            = SaveEnum.NotFound;
            HttpResponseMessage httpResponseMessage = new HttpResponseMessage();

            try
            {
                if (contactModel != null && contactModel.Id > 0 && !string.IsNullOrEmpty(contactModel.FirstName) && !string.IsNullOrEmpty(contactModel.Email))
                {
                    string email = contactModel.Email;
                    if (contactModel.IsEmailAlreadyExist(email, contactModel.Id))
                    {
                        httpResponseMessage = Request.CreateResponse(HttpStatusCode.Conflict, "Email ID exist.");
                        return(httpResponseMessage);
                    }


                    SaveEnum = contactModel.UpdateContact(contactModel);
                    if (SaveEnum == SaveEnum.Success)
                    {
                        httpResponseMessage = Request.CreateResponse(HttpStatusCode.OK);
                        httpResponseMessage.Headers.Location = new Uri(Request.RequestUri + "/" + (contactModel.Id).ToString());
                    }
                    else if (SaveEnum == SaveEnum.NotFound)
                    {
                        httpResponseMessage = Request.CreateResponse(HttpStatusCode.NotFound);
                    }
                    else if (SaveEnum == SaveEnum.Error)
                    {
                        httpResponseMessage = Request.CreateResponse(404);
                    }
                    return(httpResponseMessage);
                }
                else
                {
                    httpResponseMessage = Request.CreateResponse(HttpStatusCode.BadRequest);
                    return(httpResponseMessage);
                }
            }
            catch (Exception ex)
            {
                httpResponseMessage = Request.CreateResponse(HttpStatusCode.BadRequest);
                httpResponseMessage.ReasonPhrase = ex.Message.ToString();
                throw new HttpResponseException(httpResponseMessage);
            }
        }