public static void UpdateData(int id, MsCodeModel model) { var data = MsCodeRepository.GetAll().Where(x => x.Id.Equals(id)).SingleOrDefault(); data.Name = model.Name; data.Details = model.Details; //do update on server }
public static MsCodeModel DeleteData(int id) { return(MsCodeRepository.GetAll().Where(x => x.Id.Equals(id)).SingleOrDefault()); }