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