I would like to make a DTO which contains Entities. How should I do that? Is it possible?
For example I have something like this in my server project:
public class MyCustomDTO
{
[Key]
public int id { get; set; }
public EntityCollection<MyEntity> list { get; set; }
public MyEntity2 dummyproperty { get; set; }
public string name{ get; set; }
}
But on the client side only the basic types are generated, and the collection and the MyEntity2 typed property is not.
My goal is to encapsulate a few different entities into one DTO, instead of collecting them with multiple async queries...
Or what different solutions might be suitable for this scenario? Am I missing something (some attributes) or it's just not supported?