How i can return list with anonymous type, because with this code i get
\"The type or namespace name \'T\' could not be found (are you missing a using directive or a
You can return anonymous types by casting them to Object, but this is rarely useful. However if you are returning it from say an WebApi controller as a quick and (not so) dirty DTO then I think it is perfectly fine. This only works with JSON though. XML will complain about the schema or something, but nowadays everybody use JSON anyway :)
public static List