void CheckNull(Ticket ticket) { if (null == ticket) { throw new ArgumentNullException("id error, not product"); } }
public void Edit(string id, Ticket ticketNew) { //si no existe producto, lanza excepcion var checknull = Get(id); CheckNull(checknull); int _id = Int32.Parse(id); _service.Edit(_id, ticketNew); Save(); }
public void Add(Ticket ticket) { _service.Add(ticket); Save(); }