public JsonResult GetFilmsOfDay([FromBody] DayRequests day)
        {
            var films = new List <Film>();

            films = ApiHelper <List <Film> > .HttpPostAsync($"{Helper.ApiUrl}api/film/GetFilmsOfDay", day);

            return(Json(new { films }));
        }
        public async Task <IEnumerable <Film> > GetFilmsOfDay(DayRequests day)
        {
            DynamicParameters parameters = new DynamicParameters();

            parameters.Add("@Day", day.Day);
            return(await SqlMapper.QueryAsync <Film>(cnn : conn,
                                                     param : parameters,
                                                     sql : "sp_FilmOfDate",
                                                     commandType : CommandType.StoredProcedure));;
        }
Beispiel #3
0
 public Task <IEnumerable <Film> > GetFilmsOfDay(DayRequests day)
 {
     return(filmRepository.GetFilmsOfDay(day));
 }
 public async Task <IEnumerable <Film> > GetFilmsOfDay(DayRequests day)
 {
     return(await filmService.GetFilmsOfDay(day));
 }