コード例 #1
0
 /// <summary>Extension method which produces a projection to SD.HnD.DTOs.DtoClasses.RoleDto which instances are projected from the
 /// results of the specified baseQuery using QuerySpec, which returns SD.HnD.DALAdapter.EntityClasses.RoleEntity instances, the root entity of the derived element returned by this query.</summary>
 /// <param name="baseQuery">The base query to project the derived element instances from.</param>
 /// <param name="qf">The query factory used to create baseQuery.</param>
 /// <returns>DynamicQuery to retrieve SD.HnD.DTOs.DtoClasses.RoleDto instances</returns>
 public static DynamicQuery <SD.HnD.DTOs.DtoClasses.RoleDto> ProjectToRoleDto(this EntityQuery <SD.HnD.DALAdapter.EntityClasses.RoleEntity> baseQuery, SD.HnD.DALAdapter.FactoryClasses.QueryFactory qf)
 {
     return(qf.Create()
            .From(baseQuery.Select(Projection.Full).As("__BQ"))
            .Select(() => new SD.HnD.DTOs.DtoClasses.RoleDto()
     {
         RoleDescription = RoleFields.RoleDescription.Source("__BQ").ToValue <System.String>(),
         RoleID = RoleFields.RoleID.Source("__BQ").ToValue <System.Int32>(),
         // __LLBLGENPRO_USER_CODE_REGION_START ProjectionRegionQS_Role
         // __LLBLGENPRO_USER_CODE_REGION_END
     }));
 }
コード例 #2
0
 /// <summary>Extension method which produces a projection to SD.HnD.DTOs.DtoClasses.UserInRoleDto which instances are projected from the
 /// results of the specified baseQuery using QuerySpec, which returns SD.HnD.DALAdapter.EntityClasses.UserEntity instances, the root entity of the derived element returned by this query.</summary>
 /// <param name="baseQuery">The base query to project the derived element instances from.</param>
 /// <param name="qf">The query factory used to create baseQuery.</param>
 /// <returns>DynamicQuery to retrieve SD.HnD.DTOs.DtoClasses.UserInRoleDto instances</returns>
 public static DynamicQuery <SD.HnD.DTOs.DtoClasses.UserInRoleDto> ProjectToUserInRoleDto(this EntityQuery <SD.HnD.DALAdapter.EntityClasses.UserEntity> baseQuery, SD.HnD.DALAdapter.FactoryClasses.QueryFactory qf)
 {
     return(qf.Create()
            .From(baseQuery.Select(Projection.Full).As("__BQ"))
            .Select(() => new SD.HnD.DTOs.DtoClasses.UserInRoleDto()
     {
         AmountOfPostings = UserFields.AmountOfPostings.Source("__BQ").ToValue <Nullable <System.Int32> >(),
         EmailAddress = UserFields.EmailAddress.Source("__BQ").ToValue <System.String>(),
         NickName = UserFields.NickName.Source("__BQ").ToValue <System.String>(),
         UserID = UserFields.UserID.Source("__BQ").ToValue <System.Int32>(),
         // __LLBLGENPRO_USER_CODE_REGION_START ProjectionRegionQS_UserInRole
         // __LLBLGENPRO_USER_CODE_REGION_END
     }));
 }
コード例 #3
0
 /// <summary>Extension method which produces a projection to SD.HnD.DTOs.DtoClasses.SectionDto which instances are projected from the
 /// results of the specified baseQuery using QuerySpec, which returns SD.HnD.DALAdapter.EntityClasses.SectionEntity instances, the root entity of the derived element returned by this query.</summary>
 /// <param name="baseQuery">The base query to project the derived element instances from.</param>
 /// <param name="qf">The query factory used to create baseQuery.</param>
 /// <returns>DynamicQuery to retrieve SD.HnD.DTOs.DtoClasses.SectionDto instances</returns>
 public static DynamicQuery <SD.HnD.DTOs.DtoClasses.SectionDto> ProjectToSectionDto(this EntityQuery <SD.HnD.DALAdapter.EntityClasses.SectionEntity> baseQuery, SD.HnD.DALAdapter.FactoryClasses.QueryFactory qf)
 {
     return(qf.Create()
            .From(baseQuery.Select(Projection.Full).As("__BQ"))
            .Select(() => new SD.HnD.DTOs.DtoClasses.SectionDto()
     {
         OrderNo = SectionFields.OrderNo.Source("__BQ").ToValue <System.Int16>(),
         SectionDescription = SectionFields.SectionDescription.Source("__BQ").ToValue <System.String>(),
         SectionID = SectionFields.SectionID.Source("__BQ").ToValue <System.Int32>(),
         SectionName = SectionFields.SectionName.Source("__BQ").ToValue <System.String>(),
         // __LLBLGENPRO_USER_CODE_REGION_START ProjectionRegionQS_Section
         // __LLBLGENPRO_USER_CODE_REGION_END
     }));
 }
コード例 #4
0
 /// <summary>Extension method which produces a projection to SD.HnD.DTOs.DtoClasses.IPBanDto which instances are projected from the
 /// results of the specified baseQuery using QuerySpec, which returns SD.HnD.DALAdapter.EntityClasses.IPBanEntity instances, the root entity of the derived element returned by this query.</summary>
 /// <param name="baseQuery">The base query to project the derived element instances from.</param>
 /// <param name="qf">The query factory used to create baseQuery.</param>
 /// <returns>DynamicQuery to retrieve SD.HnD.DTOs.DtoClasses.IPBanDto instances</returns>
 public static DynamicQuery <SD.HnD.DTOs.DtoClasses.IPBanDto> ProjectToIPBanDto(this EntityQuery <SD.HnD.DALAdapter.EntityClasses.IPBanEntity> baseQuery, SD.HnD.DALAdapter.FactoryClasses.QueryFactory qf)
 {
     return(qf.Create()
            .From(baseQuery.Select(Projection.Full).As("__BQ")
                  .InnerJoin(qf.User.As("__L0_0")).On(IPBanFields.IPBanSetByUserID.Source("__BQ").Equal(UserFields.UserID.Source("__L0_0"))))
            .Select(() => new SD.HnD.DTOs.DtoClasses.IPBanDto()
     {
         IPBanID = IPBanFields.IPBanID.Source("__BQ").ToValue <System.Int32>(),
         IPBanSetByUserID = IPBanFields.IPBanSetByUserID.Source("__BQ").ToValue <System.Int32>(),
         IPBanSetOn = IPBanFields.IPBanSetOn.Source("__BQ").ToValue <System.DateTime>(),
         IPSegment1 = IPBanFields.IPSegment1.Source("__BQ").ToValue <System.Byte>(),
         IPSegment2 = IPBanFields.IPSegment2.Source("__BQ").ToValue <System.Byte>(),
         IPSegment3 = IPBanFields.IPSegment3.Source("__BQ").ToValue <System.Byte>(),
         IPSegment4 = IPBanFields.IPSegment4.Source("__BQ").ToValue <System.Byte>(),
         Range = IPBanFields.Range.Source("__BQ").ToValue <System.Byte>(),
         Reason = IPBanFields.Reason.Source("__BQ").ToValue <System.String>(),
         SetByUserNickName = UserFields.NickName.Source("__L0_0").ToValue <System.String>(),
         // __LLBLGENPRO_USER_CODE_REGION_START ProjectionRegionQS_IPBan
         // __LLBLGENPRO_USER_CODE_REGION_END
     }));
 }
コード例 #5
0
 /// <summary>Extension method which produces a projection to SD.HnD.DTOs.DtoClasses.MessageInThreadDto which instances are projected from the
 /// results of the specified baseQuery using QuerySpec, which returns SD.HnD.DALAdapter.EntityClasses.MessageEntity instances, the root entity of the derived element returned by this query.</summary>
 /// <param name="baseQuery">The base query to project the derived element instances from.</param>
 /// <param name="qf">The query factory used to create baseQuery.</param>
 /// <returns>DynamicQuery to retrieve SD.HnD.DTOs.DtoClasses.MessageInThreadDto instances</returns>
 public static DynamicQuery <SD.HnD.DTOs.DtoClasses.MessageInThreadDto> ProjectToMessageInThreadDto(this EntityQuery <SD.HnD.DALAdapter.EntityClasses.MessageEntity> baseQuery, SD.HnD.DALAdapter.FactoryClasses.QueryFactory qf)
 {
     return(qf.Create()
            .From(baseQuery.Select(Projection.Full).As("__BQ")
                  .InnerJoin(qf.User.As("__L0_0")).On(MessageFields.PostedByUserID.Source("__BQ").Equal(UserFields.UserID.Source("__L0_0")))
                  .InnerJoin(qf.UserTitle.As("__L0_1")).On(UserFields.UserTitleID.Source("__L0_0").Equal(UserTitleFields.UserTitleID.Source("__L0_1"))))
            .Select(() => new SD.HnD.DTOs.DtoClasses.MessageInThreadDto()
     {
         Attachments = (List <SD.HnD.DTOs.DtoClasses.MessageInThreadDtoTypes.AttachmentDto>)qf.Attachment.TargetAs("__L1_0")
                       .CorrelatedOver(MessageFields.MessageID.Source("__BQ").Equal(AttachmentFields.MessageID.Source("__L1_0")))
                       .Select(() => new SD.HnD.DTOs.DtoClasses.MessageInThreadDtoTypes.AttachmentDto()
         {
             AddedOn = AttachmentFields.AddedOn.Source("__L1_0").ToValue <System.DateTime>(),
             Approved = AttachmentFields.Approved.Source("__L1_0").ToValue <System.Boolean>(),
             AttachmentID = AttachmentFields.AttachmentID.Source("__L1_0").ToValue <System.Int32>(),
             Filename = AttachmentFields.Filename.Source("__L1_0").ToValue <System.String>(),
             Filesize = AttachmentFields.Filesize.Source("__L1_0").ToValue <System.Int32>(),
         }).ToResultset(),
         MessageID = MessageFields.MessageID.Source("__BQ").ToValue <System.Int32>(),
         MessageTextAsHTML = MessageFields.MessageTextAsHTML.Source("__BQ").ToValue <System.String>(),
         PostedByUser = new SD.HnD.DTOs.DtoClasses.MessageInThreadDtoTypes.PostedByUserDto()
         {
             AmountOfPostings = UserFields.AmountOfPostings.Source("__L0_0").ToValue <Nullable <System.Int32> >(),
             IconURL = UserFields.IconURL.Source("__L0_0").ToValue <System.String>(),
             JoinDate = UserFields.JoinDate.Source("__L0_0").ToValue <Nullable <System.DateTime> >(),
             Location = UserFields.Location.Source("__L0_0").ToValue <System.String>(),
             NickName = UserFields.NickName.Source("__L0_0").ToValue <System.String>(),
             Signature = UserFields.Signature.Source("__L0_0").ToValue <System.String>(),
             UserID = UserFields.UserID.Source("__L0_0").ToValue <System.Int32>(),
             UserTitleDescription = UserTitleFields.UserTitleDescription.Source("__L0_1").ToValue <System.String>(),
         },
         PostedFromIP = MessageFields.PostedFromIP.Source("__BQ").ToValue <System.String>(),
         PostingDate = MessageFields.PostingDate.Source("__BQ").ToValue <System.DateTime>(),
         ThreadID = MessageFields.ThreadID.Source("__BQ").ToValue <System.Int32>(),
         // __LLBLGENPRO_USER_CODE_REGION_START ProjectionRegionQS_MessageInThread
         // __LLBLGENPRO_USER_CODE_REGION_END
     }));
 }