public async Task <IEnumerable <Schedule> > FindByCinemaHallAsync(CinemaHall ch) { return(await adoTemplate.QueryAsync(@"SELECT * FROM Schedule INNER JOIN CinemaHall ON CinemaHall.CinemaHallId = Schedule.CinemaHallId INNER JOIN Movie ON Movie.MovieId = Schedule.MovieId WHERE Schedule.CinemaHallId = @CId AND Movie.Archived = 0", MapRowToSchedule, new QueryParameter("@CId", ch.CinemaHallId))); }
public async Task <Seat> FindByIdAsync(int id) { return((await adoTemplate.QueryAsync("SELECT * FROM Seat " + "INNER JOIN Row ON Row.RowId = Seat.RowId " + "INNER JOIN SeatCategory ON SeatCategory.SeatCategoryId = Row.SeatCategoryId " + "WHERE Seat.SeatId = @SId", MapRowToSeat, new QueryParameter(@"@SId", id))).FirstOrDefault()); }
public async Task <IEnumerable <Row> > FindByCinemaHallAsync(CinemaHall ch) { IEnumerable <Row> rows = await adoTemplate.QueryAsync(@"SELECT * FROM Row INNER JOIN SeatCategory ON Row.SeatCategoryId = SeatCategory.SeatCategoryId INNER JOIN CinemaHall ON CinemaHall.CinemaHallId = Row.CinemaHallId WHERE Row.CinemaHallId = @CId", MapRowToRow, new QueryParameter("@CId", ch.CinemaHallId)); ch.Rows = rows; return(rows); }
public Task <IEnumerable <Measurements> > FindAllMeasurementsByStationInTimeIntervalAsync(Stations station, DateTime begin, DateTime end) { // List<Measurements> res = new List<Measurements>(); var res = template.QueryAsync("select * from Measurements where Station=@station and Timestamp>=@begin and Timestamp<=@end", measurementMapper, new[] { new SqlParameter("@station", station.Station), new SqlParameter("@begin", begin), new SqlParameter("@end", end) }); return(res); }
public async Task <StationType> FindByIdAsync(int id) { return((await _template.QueryAsync("SELECT * FROM station_type WHERE id =@id", new[] { new QueryParameter("@id", id) }, StationTypeMapper)).FirstOrDefault()); }
public async Task <IEnumerable <Actor> > FindAllAsync() { return(await adoTemplate.QueryAsync("SELECT * FROM Actor", MapRowToActor)); }
public async Task <IEnumerable <Measurement> > FindAllAsync() { return(await _template.QueryAsync("select * from measurement", MeasurementMapper)); }
public async Task <IEnumerable <Genre> > FindAllAsync() { return(await adoTemplate.QueryAsync("SELECT * FROM Genre", MapRowToGenre)); }
public async Task <IEnumerable <CinemaHall> > FindAllAsync() { return(await adoTemplate.QueryAsync(@"SELECT * FROM CinemaHall", MapRowToCinemaHall)); }
public async Task <IEnumerable <Reservation> > FindAllAsync() { return(await adoTemplate.QueryAsync("SELECT * FROM Reservation " + "INNER JOIN Schedule ON Schedule.ScheduleId = Reservation.ScheduleId", MapRowToReservation)); }
public async Task <IEnumerable <Unit> > FindAllAsync() { return(await _template.QueryAsync("select * from unit", unitMapper)); }
public async Task <IEnumerable <District> > FindAllAsync() { return(await _template.QueryAsync("select * from district", districtMapper)); }
public async Task <SeatCategory> FindByIdAsync(int id) { return((await adoTemplate.QueryAsync("SELECT * FROM SeatCategory WHERE SeatCategoryId = @SId", MapRowToSeatCategory, new QueryParameter(@"SId", id))).FirstOrDefault()); }
public async Task <User> FindByIdAsync(int id) { return((await _template.QueryAsync("SELECT * FROM user WHERE id = @id", new[] { new QueryParameter("@id", id) }, UserMapper)).FirstOrDefault()); }
public async Task <IEnumerable <Province> > FindAllAsync() { //Thread.Sleep(100000); return(await _template.QueryAsync("select * from province", provinceMapper)); }
public async Task <IEnumerable <Community> > FindAllAsync() { return(await _template.QueryAsync("select * from community", communityMapper)); }
public async Task <IEnumerable <Movie> > FindAllAsync() { return(await adoTemplate.QueryAsync("SELECT * FROM Movie WHERE Movie.Archived = 0", MapRowToMovie)); }