コード例 #1
0
        public static void MainDALTester()
        {
            var repository   = SqlRepositoryFactory.CreateOrGet();
            var booleanvalue = repository.CanStudentBuyStudentTicket(1, 1);


            //var a = repository.GetEvent(1);

            //Console.WriteLine(a.Name);

            //var dto = new EventDTO()
            //{
            //    Name = "dto",
            //    Description = "dto",
            //    Price = 10,
            //    StudentPrice = 5,
            //    Date = DateTime.Now,
            //    Place = "dto"
            //};
            //var id = repository.CreateEvent(dto);
            Console.WriteLine(booleanvalue);
        }
コード例 #2
0
 public bool CanStudentBuyStudentTicket(int eventId, int studentId)
 {
     return(SqlRepositoryFactory.CreateOrGet().CanStudentBuyStudentTicket(eventId, studentId));
 }
コード例 #3
0
 public IEnumerable <EventDTO> GetFutureEvents()
 {
     return(SqlRepositoryFactory.CreateOrGet().GetFutureEvents());
 }
コード例 #4
0
 public int Create(EventDTO dto)
 {
     return(SqlRepositoryFactory.CreateOrGet().CreateEvent(dto));
 }
コード例 #5
0
 public EventDTO Get(int id)
 {
     return(SqlRepositoryFactory.CreateOrGet().GetEvent(id));
 }