Esempio n. 1
0
 public CityRoadServiceDatabase(
     CityRoadService cityRoadServiceProvidingDataForPopulatingDatabaseIfEmpty
     )
 {
     sessionFactory = PersistenceSessionFactory.CreateSessionFactory();
     cityDataMapper = new CityDataMapper(sessionFactory);
     roadDataMapper = new RoadDataMapper(sessionFactory);
     this.cityRoadServiceProvidingDataForPopulatingDatabaseIfEmpty = cityRoadServiceProvidingDataForPopulatingDatabaseIfEmpty;
 }
        private readonly CityDataMapper cityDataMapper;     //  TODO: real ORM (Object-Relational Mapping) without usage of this class from here

        public RoadDataMapper(ISessionFactory sf) : base(sf)
        {
            cityDataMapper = new CityDataMapper(sf);
        }