/// <summary> /// Description: Return Instance Of POCO Classes Based On DTO Format /// </summary> /// <param name="dtoFormat">Enum For DTO Format</param> /// <param name="censusDAO">Instance Of CensusDAO</param> /// <returns>Returns Object Based On DTOFormat</returns> public object GetDTO(DTO dtoFormat, CensusDAO censusDAO) { if (dtoFormat.Equals(DTO.INDIA_CENSUS)) { return(new IndianCensus(censusDAO.State, censusDAO.Population, censusDAO.AreaInSqKm, censusDAO.PopulationDensity)); } if (dtoFormat.Equals(DTO.INDIA_STATE_CODE)) { return(new IndianStateCode(censusDAO.State, censusDAO.SrNo, censusDAO.TIN, censusDAO.StateCode)); } return(new USCensus(censusDAO.State, censusDAO.StateCode, censusDAO.Population, censusDAO.WaterArea, censusDAO.HousingUnits, censusDAO.HousingDensity, censusDAO.LandArea, censusDAO.AreaInSqKm, censusDAO.PopulationDensity)); }