// PUT: api/NewsUpdate/5
 public string PutNews(int id, [FromBody] TableNewsUpdate newsObj)
 {
     try
     {
         TableNewsUpdate tn = new TableNewsUpdate();
         tn.Title                = newsObj.Title;
         tn.Exerpt               = newsObj.Exerpt;
         tn.Source               = newsObj.Source;
         tn.Category             = newsObj.Category;
         tn.Region               = newsObj.Region;
         tn.PostedDate           = newsObj.PostedDate;
         tn.isActive             = newsObj.isActive;
         tn.UserId               = newsObj.UserId;
         db.Entry(newsObj).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return("Ok");
     }
     catch (Exception)
     {
         throw;
     }
 }
 // POST: api/NewsUpdate
 public string PostNews([FromBody] TableNewsUpdate newsObj)
 {
     try
     {
         TableNewsUpdate tn = new TableNewsUpdate();
         tn.Title      = newsObj.Title;
         tn.Exerpt     = newsObj.Exerpt;
         tn.Source     = newsObj.Source;
         tn.Category   = newsObj.Category;
         tn.Region     = newsObj.Region;
         tn.PostedDate = DateTime.Now;
         tn.isActive   = true;
         tn.UserId     = newsObj.UserId;
         db.TableNewsUpdates.Add(tn);
         db.SaveChanges();
         return("Ok");
     }
     catch (Exception ee)
     {
         throw ee;
     }
 }