Return Object C # by AJAX (Json - ASP.NET - MVC 5)

0

I am working on an application which contains a 'Kanban' board (Some will know what it is). I am trying to return a C # object, which contains other objects (which would be the tasks that the user has created on that board). What I want to do is that at the moment of returning the data to the view, I am only listing the 'Task' field of each one of those objects.

This is the way I am returning the data and it works for me. But as you can see the part I have commented is what does not work, I guess because I must do some conversion to that object 'kanban'.

What should I do or how can you help me?

Thanks

    
asked by Mateo Castaño Tobon 12.09.2018 в 15:50
source

1 answer

-1

If you want to return only the tasks you would use

resultadoKanban = kanban.Select(x=>x.Tarea).ToList()

The idea is just to take that propety to have the list

    
answered by 12.09.2018 / 16:12
source