コード例 #1
0
ファイル: AgencyFactory.cs プロジェクト: girish66/REM
        /// <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);
        }