コード例 #1
0
        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
        }
コード例 #2
0
 public static MsCodeModel DeleteData(int id)
 {
     return(MsCodeRepository.GetAll().Where(x => x.Id.Equals(id)).SingleOrDefault());
 }