示例#1
0
        public HotelDAO()
        {
            ICassandraDAO cassandraDAO = new CassandraDAO();

            session = cassandraDAO.GetSession();
            session.UserDefinedTypes.Define(
                UdtMap.For <HotelInfo>("hotel_info", "booking"),
                UdtMap.For <Hotel>("hotel_info", "booking")
                );
            mapper = new Mapper(session);
            //MappingConfiguration.Global.Define(new Map<RoomBooking>()
            //                                    .Column(b => b.HotelId, cm => cm.WithName("hotel_id"))
            //                                    .Column(b => b.RoomId, cm => cm.WithName("room_id"))
            //                                    .Column(b => b.StartReserveTime, cm => cm.WithName("start_reserverve_time"))
            //                                    .Column(b => b.EndReserveTime, cm => cm.WithName("end_reserverve_time")));
        }
 public UserDAO()
 {
     ICassandraDAO cassandraDAO = new CassandraDAO();
     session = cassandraDAO.GetSession();
     mapper = new Mapper(session);
 }