/// <summary> /// Creates the agency. /// </summary> /// <param name="agencyProfile"> /// The agency profile. /// </param> /// <returns> /// An Agency. /// </returns> public Agency CreateAgency(AgencyProfile agencyProfile) { Check.IsNotNull(agencyProfile, "agencyProfile is required."); Agency agency = new AgencyBuilder().WithAgencyProfile(agencyProfile); _agencyRepository.MakePersistent(agency); return(agency); }