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); }
public bool CanStudentBuyStudentTicket(int eventId, int studentId) { return(SqlRepositoryFactory.CreateOrGet().CanStudentBuyStudentTicket(eventId, studentId)); }
public IEnumerable <EventDTO> GetFutureEvents() { return(SqlRepositoryFactory.CreateOrGet().GetFutureEvents()); }
public int Create(EventDTO dto) { return(SqlRepositoryFactory.CreateOrGet().CreateEvent(dto)); }
public EventDTO Get(int id) { return(SqlRepositoryFactory.CreateOrGet().GetEvent(id)); }