HI,

given a Class lets say

public class User
{
        public virtual int Id {get;set;}
        public virtual IList<ProjectGroup> ProjectGroups{get;set;}
}

and a DTO

public class UserDTO
{
        public int Id {get;set;}
        publicIList<ProjectGroupDTO> ProjectGroups{get;set;}
}

i want to project the results from the User to UserDTO.

DetachedCriteria dc = DetachedCriteria.For(typeof (User));
dc.CreateAlias("ProjectGroups", "pg");
dc.SetProjection(Projections.ProjectionList()
                             .Add(Projections.Property("Id"),"Id")
                             .Add(Projections.Property
("User.UserGroups"), ));

dc.SetResultTransformer(Transformers.AliasToBean(typeof (UserDTO)));

something is missing or simply i dont get it!!!

Can someone please guide me???

Thx








--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to