public void Delete(TipoPartida tipoPartida) { try { if (tipoPartida != null) { _context.Remove(tipoPartida); _context.SaveChanges(); } } catch (Exception ex) { throw new Exception(ex.Message); } }
public void Add(TipoPartida tipoPartida) { try { if (tipoPartida != null) { if (tipoPartida.Id == 0) { _context.Add(tipoPartida); _context.SaveChanges(); } } } catch (Exception ex) { throw new Exception(ex.Message); } }
public void SetTipoPartida(TipoPartida t) { tipoPartida = t; }