/// <summary> /// This method will map a dynamic result to a single instance of a facility /// </summary> /// <param name="results"></param> /// <returns></returns> private static Facility MapFacilityItem(dynamic results) { var address = new Address(results[0].Address1, results[0].City, results[0].State, string.Empty, results[0].ZipCode); var facility = new Facility(results[0].FacilityId, results[0].Name, results[0].Code, results[0].LegalName, results[0].FacilityLegalName); facility.AddNewAddess(address); return(facility); }