예제 #1
0
 //编辑
 public CheckPoints Edit(CheckPoints CheckPoints)
 {
     DBEntity.CheckPoints.Attach(CheckPoints);
           DBEntity.Entry<CheckPoints>(CheckPoints).State = EntityState.Modified;
           DBEntity.SaveChanges();
           return CheckPoints;
 }
예제 #2
0
 //新增
 public CheckPoints Add(CheckPoints CheckPoints)
 {
     DBEntity.CheckPoints.Add(CheckPoints);
                  DBEntity.SaveChanges();
              return  CheckPoints ;
 }