public MethodResult <TicketItem> AddTicketItem(string description, double price, int ticketId) { var newTicketItem = new TicketItem { Description = description, Price = price, TicketId = ticketId }; _ticketItemRepository.Add(newTicketItem); return(new MethodResult <TicketItem>(newTicketItem)); }
public TicketItem addNewTicketItem(TicketItem item) { try { ticketItemRepo.Add(item); return(item); } catch (Exception e) { Console.WriteLine(e.Message); return(item); } }