private static void GetBooking() { SqlOption option = new SqlOption { ConnectionString = "Server=localhost;Port=3306;Database=yue;Uid=root;Pwd=123456;" }; BookingRepository bookingRepository = new BookingRepository(option); BookingService bookingService = new BookingService(bookingRepository); var booking = bookingService.Get(100, true); }
private static void Subscribe() { SubscribeResource sr = new SubscribeResource(1, 1, 100, "test", 1000, DateTime.Now, new Bookings.Contract.TimeSlot(DateTime.Now, DateTime.Now.AddHours(4).AddSeconds(32))); SqlOption option = new SqlOption { ConnectionString = "Server=localhost;Port=3306;Database=yue;Uid=root;Pwd=123456;" }; BookingWriteRepository bookingWriteRepository = new BookingWriteRepository(option); BookingHandler bookingHandler = new BookingHandler(bookingWriteRepository); bookingHandler.Execute(sr); }
public BookingRepository(SqlOption option) : base(option) { }
public BaseRepository(SqlOption option) { this.ConnectionString = option.ConnectionString; }
public UserWriteRepository(SqlOption option) : base(option) { }
public UserSecurityRepository(SqlOption option) : base(option) { }