コード例 #1
0
 public static void AddOrUpdate(PowerEntities db, TS_OPER_ROLE selectedData, TS_OPERATOR oper)
 {
     try
     {
         db.TS_OPER_ROLE.AddOrUpdate(p => p.UID, selectedData);
     }
     catch (DbEntityValidationException dbEx)
     {
         Console.WriteLine(dbEx.ToString());
         throw;
     }
 }
コード例 #2
0
 public static void Delete(PowerEntities db, TS_OPER_ROLE data, TS_OPERATOR oper)
 {
     db.Entry(data).State = EntityState.Deleted;
 }