Exemplo n.º 1
0
 public static void AddOrUpdate(PowerEntities db, TA_MENU selectedData, TS_OPERATOR oper)
 {
     try
     {
         db.TA_MENU.AddOrUpdate(p => p.MenuCode, selectedData);
     }
     catch (DbEntityValidationException dbEx)
     {
         Console.WriteLine(dbEx.ToString());
         throw;
     }
 }
Exemplo n.º 2
0
 public static void Delete(PowerEntities db, TA_MENU data, TS_OPERATOR oper)
 {
     db.Entry(data).State = EntityState.Deleted;
 }