❔ API doesnt return dynamic object in ASP.NET Core 2.0
I am looking to return a list from a Dynamic linq query but the problem comes when returning the list it doesnt return anything on swagger
the code is like
var result = _ctx.AccionFormativa
.Include(x => x.OfertaFormativa)
.Include(x => x.Modalidad)
.Include(x => x.ProgramasFormacion)
.Include(x => x.StatusCurso)
.Include(x => x.Centro)
.ThenInclude(x => x.DireccionCentro)
.Include(x => x.Ambito)
.GroupBy(fields, "it")
.ToDynamicList()
.Select(x => (new DynamicExpando(x)).GetCurrentObject);
var result = _ctx.AccionFormativa
.Include(x => x.OfertaFormativa)
.Include(x => x.Modalidad)
.Include(x => x.ProgramasFormacion)
.Include(x => x.StatusCurso)
.Include(x => x.Centro)
.ThenInclude(x => x.DireccionCentro)
.Include(x => x.Ambito)
.GroupBy(fields, "it")
.ToDynamicList()
.Select(x => (new DynamicExpando(x)).GetCurrentObject);