0

Due to a technical restriction of the entity framework I have to return my data in an extra class which is a data transfer object instead of return the data with a Module class.

from m in context.Modules.Where(x => x.ParentId == null)
          join child in context.Modules on m.Id equals child.ParentId
              into groupJoin
          select new ModuleDTO { m.Id, HasChildren = groupJoin.Any() }

The ModuleDTO is not my business object. It is used within my ModuleRepository.

Where should I put this DTO object which just holds getter/setter (no logic of course)

4

0 回答 0