public static int AddToLearnedMoves(LearnedMoves newMove) { try { using (DB_r0739290Entities entities = new DB_r0739290Entities()) { entities.LearnedMoves.Add(newMove); return(entities.SaveChanges()); } } catch (Exception ex) { ErrorLogging(ex); return(0); } }
public static int RemoveMove(LearnedMoves toRemove) { try { using (DB_r0739290Entities entities = new DB_r0739290Entities()) { entities.Entry(toRemove).State = EntityState.Deleted; return(entities.SaveChanges()); } } catch (Exception ex) { ErrorLogging(ex); return(0); } }