private void Agregar(TicketVm ticketVm) { var obj = TicketFactory.CrearEntity(ticketVm); obj.Numero = ObtenerProximoIdentificador(); obj.FechaCreacion = DateTime.Now; TicketFactory.MapTicketEmpleado(ticketVm, obj); TicketFactory.MapTicketEntrada(ticketVm, obj); _repository.Agregar(obj); }