Пример #1
0
        public void Execute()
        {
            var daoFactory = DAOFactory.GetFactory(DAOFactory.Type.Postgres);
            var mapper     = MapperFactory.CreateBaggageMapper();
            var entity     = daoFactory.GetBaggageDao().GetById(_id);

            _result = mapper.CreateDTO(entity);
        }
        public void Execute()
        {
            var daoFactory = DAOFactory.GetFactory(DAOFactory.Type.Postgres);
            var entity     = daoFactory.GetBaggageDao().GetByPassport(_passportNumber);
            var mapper     = MapperFactory.CreateBaggageMapper();

            _result = mapper.CreateDTOList(entity);
        }
        public void Execute()
        {
            var daoFactory = DAOFactory.GetFactory(DAOFactory.Type.Postgres);
            var baggageDao = daoFactory.GetBaggageDao();
            var mapper     = MapperFactory.CreateBaggageMapper();
            var entity     = mapper.CreateEntity(_fieldsToUpdate);

            CommandFactory.CreateValidateBaggageUpdateCommand(entity).Execute();
            baggageDao.Update(_idToSearch, entity);
        }
Пример #4
0
        public void Setup()
        {
            _baggageController = new BaggageController(null);
            var baggage = BaggageBuilder.Create()
                          .WithDescription("Bolso negro extraviado en el areopuerto de maiquetia")
                          .WithId(6)
                          .WithStatus("EXTRAVIADO")
                          .Build();

            _baggageMapper = MapperFactory.CreateBaggageMapper();
            _baggagedto    = _baggageMapper.CreateDTO(baggage);
        }
 public void SetUp()
 {
     _baggageMapper = MapperFactory.CreateBaggageMapper();
     _baggageDto    = new BaggageDTO()
     {
         Id          = 1,
         Description = "Maleta negra",
         Status      = "ENCONTRADO"
     };
     _baggageDtos = new List <BaggageDTO> {
         _baggageDto
     };
 }