Thanks for the reply,
Your advise is appreciated and i'm going to agree with you.  My
question now is what stratagy would you recomend for DTO that
minimizes coding and can make use of existing entities, but not break
sepration? I'm really trying to organize, simplify, and standardize my
projects even if it means creating a mini framework just for DTO, i'll
do it.


On Oct 17, 7:35 pm, José F. Romaniello <[email protected]> wrote:
> It is not a good place for such logic.A dto should be simpler than that.
> Keep nhibernate in your DAL, repositories or dao.
>
> 2009/10/17 YankeeImperialistDog <[email protected]>
>
>
>
>
>
> > I'm creating, or trying to create a DTO for a Person class
> > ******
> > namespace KurtStack.Data.Repositories
> > {
> >    public static class PersonDTO
> >    {
> >        public static object GetPersonDTO()
> >        {
> >            var session =
> > IoC.Container.Resolve<INHibernateSessionProvider>() as ISession;
> >            var obj = session.CreateCriteria(typeof(Person))
> >                .CreateAlias("FirstName", "fn")
> >                .CreateAlias("LastName", "ln");
> >            return  obj;
> >        }
> >    }
> > }
> > ***
> > my problem is getting this to return to my UI via a Command object
> > with out directly referencing INHibernateSessionProvider. Any ideas on
> > how to do this?
>
> > my command object does not directly reference KurtStack.Data.
>
> > so to get it to the UI i'd like to do something like this:
> > GetPersonDTO. ... hrlp
>
> >   public class NewPersonCommand : ICommand
> >    {
> >        private readonly Person person;
>
> >        public static object GetPersonDTO()
> >        {
> >         object obj  = GetpersonDTO();
> >            return  obj;
> >        }- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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