// PUT: api/CommentsSession/5
 public HttpResponseMessage Put(CommentsSession commentsSession)
 {
     try
     {
         response.StatusCode           = HttpStatusCode.Created;
         response.Content              = new StringContent(commentsSessionFactory.Update(commentsSession).ToString());
         response.Headers.CacheControl = new CacheControlHeaderValue()
         {
             MaxAge = TimeSpan.FromMinutes(20)
         };
     }
     catch (Exception ex)
     {
         response.StatusCode           = HttpStatusCode.BadRequest;
         response.Content              = new StringContent(ex.Message);
         response.Headers.CacheControl = new CacheControlHeaderValue()
         {
             MaxAge = TimeSpan.FromMinutes(20)
         };
     }
     return(response);
 }
 public int Update(CommentsSession entity)
 {
     return(leakDB.Update <CommentsSession>(entity));
 }
 public int Create(CommentsSession entity)
 {
     return(leakDB.Save <CommentsSession>(entity));
 }