public void Execute() { var daoFactory = DAOFactory.GetFactory(DAOFactory.Type.Postgres); var mapper = MapperFactory.CreateClaimMapper(); var entity = daoFactory.GetClaimDao().GetById(_idToSearch); _result = mapper.CreateDTO(entity); }
public void Execute() { var daoFactory = DAOFactory.GetFactory(DAOFactory.Type.Postgres); var mapper = MapperFactory.CreateClaimMapper(); var entityList = daoFactory.GetClaimDao().GetByStatus(_status); _result = mapper.CreateDTOList(entityList); }
public void Execute() { var daoFactory = DAOFactory.GetFactory(DAOFactory.Type.Postgres); var claimDao = daoFactory.GetClaimDao(); var mapper = MapperFactory.CreateClaimMapper(); var entity = mapper.CreateEntity(_fieldsToUpdate); CommandFactory.CreateValidateClaimUpdateCommand(entity).Execute(); claimDao.Update(_id, entity); }
public void Execute() { var mapper = MapperFactory.CreateClaimMapper(); var claim = mapper.CreateEntity(_claimDto); CommandFactory.CreateValidateClaimCreationCommand(claim).Execute(); var daoFactory = DAOFactory.GetFactory(DAOFactory.Type.Postgres); var savedId = daoFactory.GetClaimDao().Add(claim); _claimDto.Id = savedId; }
public void Setup() { _postgresClaimDao = new PostgresClaimDao(); _claimController = new ClaimController(null); _insertedClaims = new List <int>(); var claim = ClaimBuilder.Create() .WithStatus("ABIERTO") .WithDescription("Bolso negro extraviado en el areopuerto de maiquetia") .WithTitle("Bolso extraviado") .WithBagagge(6) .Build(); _claimMapper = MapperFactory.CreateClaimMapper(); _claimDto = _claimMapper.CreateDTO(claim); }
public void Setup() { _claimMapper = MapperFactory.CreateClaimMapper(); _claimDto = new ClaimDto() { BaggageId = 1, Description = "Description", Id = 10, Status = "CERRADO", Title = "Titulo!" }; _claimDtoList = new List <ClaimDto> { _claimDto }; }