/// <summary> /// Initializes a new instance of the <see cref="CensusDAO"/> class. /// </summary> /// <param name="indianCensusCSV">Instance Of IndianCensus POCO</param> public CensusDAO(IndianCensus indianCensusCSV) { this.State = indianCensusCSV.State; this.AreaInSqKm = indianCensusCSV.AreaInSqKm; this.Population = indianCensusCSV.Population; this.PopulationDensity = indianCensusCSV.DensityPerSqKm; }
/// <summary> /// Description: Return Most Populous State Among Two. /// </summary> /// <param name="indianCensus">Instance Of IndianCensus POCO</param> /// <param name="unitedStateCensus">Instance Of USCensus POCO</param> /// <returns>State Name</returns> public string GetMostPopulousState(IndianCensus indianCensus, USCensus unitedStateCensus) { return(indianCensus.DensityPerSqKm > unitedStateCensus.PopulationDensity ? indianCensus.State : unitedStateCensus.State); }