public static IMAdaptationRequestDTOA Convert(EntityAttributesEN en, NHibernate.ISession session = null)
        {
            IMAdaptationRequestDTOA    dto = null;
            IMAdaptationRequestRESTCAD iMAdaptationRequestRESTCAD = null;
            IMAdaptationRequestCEN     iMAdaptationRequestCEN     = null;
            IMAdaptationRequestCP      iMAdaptationRequestCP      = null;

            if (en != null)
            {
                dto = new IMAdaptationRequestDTOA();
                iMAdaptationRequestRESTCAD = new IMAdaptationRequestRESTCAD(session);
                iMAdaptationRequestCEN     = new IMAdaptationRequestCEN(iMAdaptationRequestRESTCAD);
                iMAdaptationRequestCP      = new IMAdaptationRequestCP(session);


                IMAdaptationRequestEN enHijo = iMAdaptationRequestRESTCAD.ReadOIDDefault(en.Id);



                //
                // Attributes

                dto.Id = en.Id;

                dto.Name = en.Name;


                dto.Description = en.Description;


                //
                // TravesalLink

                /* Rol: IMAdaptationRequest o--> AdaptationRequest */
                dto.ValueAdaption = AdaptationRequestAssembler.Convert((AdaptationRequestEN)enHijo.AdaptationRequest, session);


                //
                // Service
            }

            return(dto);
        }
        public static AccessModeDTOA Convert(AccessModeEN en, NHibernate.ISession session = null)
        {
            AccessModeDTOA    dto = null;
            AccessModeRESTCAD accessModeRESTCAD = null;
            AccessModeCEN     accessModeCEN     = null;
            AccessModeCP      accessModeCP      = null;

            if (en != null)
            {
                dto = new AccessModeDTOA();
                accessModeRESTCAD = new AccessModeRESTCAD(session);
                accessModeCEN     = new AccessModeCEN(accessModeRESTCAD);
                accessModeCP      = new AccessModeCP(session);



                //
                // Attributes

                dto.Id = en.Id;

                dto.TypeAccessMode = en.TypeAccessMode;


                dto.Description = en.Description;


                dto.Name = en.Name;


                //
                // TravesalLink

                /* Rol: AccessMode o--> AdaptationRequest */
                dto.AdaptationRequest = null;
                List <AdaptationRequestEN> AdaptationRequest = accessModeRESTCAD.AdaptationRequest(en.Id).ToList();
                if (AdaptationRequest != null)
                {
                    dto.AdaptationRequest = new List <AdaptationRequestDTOA>();
                    foreach (AdaptationRequestEN entry in AdaptationRequest)
                    {
                        dto.AdaptationRequest.Add(AdaptationRequestAssembler.Convert(entry, session));
                    }
                }

                /* Rol: AccessMode o--> AdaptationTypeRequired */
                dto.AdaptationType = null;
                List <AdaptationTypeRequiredEN> AdaptationType = accessModeRESTCAD.AdaptationType(en.Id).ToList();
                if (AdaptationType != null)
                {
                    dto.AdaptationType = new List <AdaptationTypeRequiredDTOA>();
                    foreach (AdaptationTypeRequiredEN entry in AdaptationType)
                    {
                        dto.AdaptationType.Add(AdaptationTypeRequiredAssembler.Convert(entry, session));
                    }
                }

                /* Rol: AccessMode o--> AdaptationDetailRequired */
                dto.AdaptationDetail = null;
                List <AdaptationDetailRequiredEN> AdaptationDetail = accessModeRESTCAD.AdaptationDetail(en.Id).ToList();
                if (AdaptationDetail != null)
                {
                    dto.AdaptationDetail = new List <AdaptationDetailRequiredDTOA>();
                    foreach (AdaptationDetailRequiredEN entry in AdaptationDetail)
                    {
                        dto.AdaptationDetail.Add(AdaptationDetailRequiredAssembler.Convert(entry, session));
                    }
                }


                //
                // Service
            }

            return(dto);
        }