Example #1
0
        private async Task <IEnumerable <Series> > GetSeriesFunc(IResolveFieldContext <object> context)
        {
            var seriesId = context.GetArgument <string>("seriesId");

            if (seriesId != null)
            {
                var series = await _seriesEngine.GetSeries(seriesId);

                return(new List <Series> {
                    series
                });
            }
            return(await _seriesEngine.GetAll());
        }
Example #2
0
        public async Task <IActionResult> GetSeries()
        {
            var series = await _seriesEngine.GetAll();

            return(Ok(series));
        }