public string DeletePoints(int Id) { string msg; if (ModelState.IsValid) { entity.InsertUpdateSelectPoints(Id, "abc", 3, true, 3); //entity.Entry(Model).State = EntityState.Modified; entity.SaveChanges(); msg = "Deleted Successfully"; } else { msg = "Validation data not successfully"; } return(msg); }