public void SubmitForm(NewsInfoEntity newsInfoEntity, string keyValue) { if (!string.IsNullOrEmpty(keyValue)) { newsInfoEntity.Modify(keyValue); service.Update(newsInfoEntity); } else { newsInfoEntity.Create(); service.Insert(newsInfoEntity); } }