예제 #1
0
 public StatsMapper()
 {
     CreateMap <DocEntitySet <DocEntityStats>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityStats, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityStats>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityStats.Get(c));
     _EntityToDto = CreateMap <DocEntityStats, Stats>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Stats>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Stats>(c, "Updated")))
                    .ForMember(dest => dest.App, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Stats>(c, nameof(DocEntityStats.App))))
                    .ForMember(dest => dest.AppId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Stats>(c, nameof(DocEntityStats.AppId))))
                    .ForMember(dest => dest.ExternalId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Stats>(c, nameof(DocEntityStats.ExternalId))))
                    .ForMember(dest => dest.ExternalType, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Stats>(c, nameof(DocEntityStats.ExternalType))))
                    .ForMember(dest => dest.ObjectId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Stats>(c, nameof(DocEntityStats.ObjectId))))
                    .ForMember(dest => dest.ObjectType, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Stats>(c, nameof(DocEntityStats.ObjectType))))
                    .ForMember(dest => dest.StudySetStats, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Stats>(c, nameof(DocEntityStats.StudySetStats))))
                    .ForMember(dest => dest.StudySetStatsId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Stats>(c, nameof(DocEntityStats.StudySetStatsId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <Stats, DocEntityStats>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #2
0
 public TermMasterMapper()
 {
     CreateMap <DocEntitySet <DocEntityTermMaster>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityTermMaster, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityTermMaster>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityTermMaster.Get(c));
     _EntityToDto = CreateMap <DocEntityTermMaster, TermMaster>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, "Updated")))
                    .ForMember(dest => dest.BioPortal, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.BioPortal))))
                    .ForMember(dest => dest.Categories, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.Categories))))
                    .ForMember(dest => dest.CategoriesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.CategoriesCount))))
                    .ForMember(dest => dest.CategoriesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.CategoriesIds))))
                    .ForMember(dest => dest.CUI, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.CUI))))
                    .ForMember(dest => dest.Enum, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.Enum))))
                    .ForMember(dest => dest.EnumId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.EnumId))))
                    .ForMember(dest => dest.MedDRA, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.MedDRA))))
                    .ForMember(dest => dest.Name, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.Name))))
                    .ForMember(dest => dest.RxNorm, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.RxNorm))))
                    .ForMember(dest => dest.SNOWMED, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.SNOWMED))))
                    .ForMember(dest => dest.Synonyms, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.Synonyms))))
                    .ForMember(dest => dest.SynonymsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.SynonymsCount))))
                    .ForMember(dest => dest.SynonymsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.SynonymsIds))))
                    .ForMember(dest => dest.TUI, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.TUI))))
                    .ForMember(dest => dest.URI, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TermMaster>(c, nameof(DocEntityTermMaster.URI))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <TermMaster, DocEntityTermMaster>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #3
0
 public TimeCardMapper()
 {
     CreateMap <DocEntitySet <DocEntityTimeCard>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityTimeCard, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityTimeCard>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityTimeCard.Get(c));
     _EntityToDto = CreateMap <DocEntityTimeCard, TimeCard>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, "Updated")))
                    .ForMember(dest => dest.Description, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.Description))))
                    .ForMember(dest => dest.Document, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.Document))))
                    .ForMember(dest => dest.DocumentId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.DocumentId))))
                    .ForMember(dest => dest.End, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.End))))
                    .ForMember(dest => dest.Project, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.Project))))
                    .ForMember(dest => dest.ProjectId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.ProjectId))))
                    .ForMember(dest => dest.ReferenceId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.ReferenceId))))
                    .ForMember(dest => dest.Start, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.Start))))
                    .ForMember(dest => dest.Status, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.Status))))
                    .ForMember(dest => dest.StatusId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.StatusId))))
                    .ForMember(dest => dest.User, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.User))))
                    .ForMember(dest => dest.UserId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.UserId))))
                    .ForMember(dest => dest.WorkType, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.WorkType))))
                    .ForMember(dest => dest.WorkTypeId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimeCard>(c, nameof(DocEntityTimeCard.WorkTypeId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <TimeCard, DocEntityTimeCard>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #4
0
 public UserRequestMapper()
 {
     CreateMap <DocEntitySet <DocEntityUserRequest>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityUserRequest, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityUserRequest>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityUserRequest.Get(c));
     _EntityToDto = CreateMap <DocEntityUserRequest, UserRequest>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, "Updated")))
                    .ForMember(dest => dest.App, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, nameof(DocEntityUserRequest.App))))
                    .ForMember(dest => dest.AppId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, nameof(DocEntityUserRequest.AppId))))
                    .ForMember(dest => dest.Method, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, nameof(DocEntityUserRequest.Method))))
                    .ForMember(dest => dest.Page, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, nameof(DocEntityUserRequest.Page))))
                    .ForMember(dest => dest.PageId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, nameof(DocEntityUserRequest.PageId))))
                    .ForMember(dest => dest.Path, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, nameof(DocEntityUserRequest.Path))))
                    .ForMember(dest => dest.URL, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, nameof(DocEntityUserRequest.URL))))
                    .ForMember(dest => dest.UserSession, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, nameof(DocEntityUserRequest.UserSession))))
                    .ForMember(dest => dest.UserSessionId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserRequest>(c, nameof(DocEntityUserRequest.UserSessionId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <UserRequest, DocEntityUserRequest>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #5
0
 public BroadcastMapper()
 {
     CreateMap <DocEntitySet <DocEntityBroadcast>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityBroadcast, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityBroadcast>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityBroadcast.Get(c));
     _EntityToDto = CreateMap <DocEntityBroadcast, Broadcast>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, "Updated")))
                    .ForMember(dest => dest.App, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.App))))
                    .ForMember(dest => dest.AppId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.AppId))))
                    .ForMember(dest => dest.ConfluenceId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.ConfluenceId))))
                    .ForMember(dest => dest.Name, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.Name))))
                    .ForMember(dest => dest.Reprocess, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.Reprocess))))
                    .ForMember(dest => dest.Reprocessed, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.Reprocessed))))
                    .ForMember(dest => dest.Scopes, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.Scopes))))
                    .ForMember(dest => dest.ScopesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.ScopesCount))))
                    .ForMember(dest => dest.ScopesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.ScopesIds))))
                    .ForMember(dest => dest.Status, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.Status))))
                    .ForMember(dest => dest.StatusId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.StatusId))))
                    .ForMember(dest => dest.Type, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.Type))))
                    .ForMember(dest => dest.Type_Id, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Broadcast>(c, nameof(DocEntityBroadcast.Type_Id))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <Broadcast, DocEntityBroadcast>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #6
0
 public ScopeMapper()
 {
     CreateMap <DocEntitySet <DocEntityScope>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityScope, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityScope>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityScope.Get(c));
     _EntityToDto = CreateMap <DocEntityScope, Scope>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, "Updated")))
                    .ForMember(dest => dest.App, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.App))))
                    .ForMember(dest => dest.AppId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.AppId))))
                    .ForMember(dest => dest.Bindings, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.Bindings))))
                    .ForMember(dest => dest.BindingsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.BindingsCount))))
                    .ForMember(dest => dest.BindingsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.BindingsIds))))
                    .ForMember(dest => dest.Broadcasts, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.Broadcasts))))
                    .ForMember(dest => dest.BroadcastsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.BroadcastsCount))))
                    .ForMember(dest => dest.BroadcastsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.BroadcastsIds))))
                    .ForMember(dest => dest.Client, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.Client))))
                    .ForMember(dest => dest.ClientId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.ClientId))))
                    .ForMember(dest => dest.Delete, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.Delete))))
                    .ForMember(dest => dest.DocumentSet, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.DocumentSet))))
                    .ForMember(dest => dest.DocumentSetId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.DocumentSetId))))
                    .ForMember(dest => dest.Edit, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.Edit))))
                    .ForMember(dest => dest.Help, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.Help))))
                    .ForMember(dest => dest.HelpCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.HelpCount))))
                    .ForMember(dest => dest.HelpIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.HelpIds))))
                    .ForMember(dest => dest.IsGlobal, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.IsGlobal))))
                    .ForMember(dest => dest.ScopedComments, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.ScopedComments))))
                    .ForMember(dest => dest.ScopedCommentsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.ScopedCommentsCount))))
                    .ForMember(dest => dest.ScopedCommentsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.ScopedCommentsIds))))
                    .ForMember(dest => dest.ScopedFiles, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.ScopedFiles))))
                    .ForMember(dest => dest.ScopedFilesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.ScopedFilesCount))))
                    .ForMember(dest => dest.ScopedFilesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.ScopedFilesIds))))
                    .ForMember(dest => dest.ScopedTags, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.ScopedTags))))
                    .ForMember(dest => dest.ScopedTagsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.ScopedTagsCount))))
                    .ForMember(dest => dest.ScopedTagsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.ScopedTagsIds))))
                    .ForMember(dest => dest.Synonyms, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.Synonyms))))
                    .ForMember(dest => dest.SynonymsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.SynonymsCount))))
                    .ForMember(dest => dest.SynonymsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.SynonymsIds))))
                    .ForMember(dest => dest.Team, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.Team))))
                    .ForMember(dest => dest.TeamId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.TeamId))))
                    .ForMember(dest => dest.Type, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.Type))))
                    .ForMember(dest => dest.User, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.User))))
                    .ForMember(dest => dest.UserId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.UserId))))
                    .ForMember(dest => dest.VariableRules, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.VariableRules))))
                    .ForMember(dest => dest.VariableRulesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.VariableRulesCount))))
                    .ForMember(dest => dest.VariableRulesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.VariableRulesIds))))
                    .ForMember(dest => dest.View, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.View))))
                    .ForMember(dest => dest.Workflows, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.Workflows))))
                    .ForMember(dest => dest.WorkflowsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.WorkflowsCount))))
                    .ForMember(dest => dest.WorkflowsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Scope>(c, nameof(DocEntityScope.WorkflowsIds))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <Scope, DocEntityScope>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #7
0
 public DataClassMapper()
 {
     CreateMap <DocEntitySet <DocEntityDataClass>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityDataClass, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityDataClass>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityDataClass.Get(c));
     _EntityToDto = CreateMap <DocEntityDataClass, DataClass>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, "Updated")))
                    .ForMember(dest => dest.AllowDelete, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.AllowDelete))))
                    .ForMember(dest => dest.AllSelectByDefault, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.AllSelectByDefault))))
                    .ForMember(dest => dest.Base, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.Base))))
                    .ForMember(dest => dest.CacheDuration, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.CacheDuration))))
                    .ForMember(dest => dest.ClassId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.ClassId))))
                    .ForMember(dest => dest.CustomCollections, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.CustomCollections))))
                    .ForMember(dest => dest.CustomCollectionsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.CustomCollectionsCount))))
                    .ForMember(dest => dest.CustomCollectionsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.CustomCollectionsIds))))
                    .ForMember(dest => dest.DELETE, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.DELETE))))
                    .ForMember(dest => dest.Description, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.Description))))
                    .ForMember(dest => dest.DontFlattenProperties, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.DontFlattenProperties))))
                    .ForMember(dest => dest.DontFlattenPropertiesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.DontFlattenPropertiesCount))))
                    .ForMember(dest => dest.DontFlattenPropertiesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.DontFlattenPropertiesIds))))
                    .ForMember(dest => dest.DtoSuffix, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.DtoSuffix))))
                    .ForMember(dest => dest.FlattenReferences, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.FlattenReferences))))
                    .ForMember(dest => dest.GET, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.GET))))
                    .ForMember(dest => dest.IgnoreProps, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.IgnoreProps))))
                    .ForMember(dest => dest.IgnorePropsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.IgnorePropsCount))))
                    .ForMember(dest => dest.IgnorePropsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.IgnorePropsIds))))
                    .ForMember(dest => dest.IsInsertOnly, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.IsInsertOnly))))
                    .ForMember(dest => dest.IsReadOnly, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.IsReadOnly))))
                    .ForMember(dest => dest.Name, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.Name))))
                    .ForMember(dest => dest.PATCH, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.PATCH))))
                    .ForMember(dest => dest.POST, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.POST))))
                    .ForMember(dest => dest.Properties, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.Properties))))
                    .ForMember(dest => dest.PropertiesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.PropertiesCount))))
                    .ForMember(dest => dest.PropertiesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.PropertiesIds))))
                    .ForMember(dest => dest.PUT, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.PUT))))
                    .ForMember(dest => dest.Tabs, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.Tabs))))
                    .ForMember(dest => dest.TabsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.TabsCount))))
                    .ForMember(dest => dest.TabsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataClass>(c, nameof(DocEntityDataClass.TabsIds))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <DataClass, DocEntityDataClass>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #8
0
 public InterventionMapper()
 {
     CreateMap <DocEntitySet <DocEntityIntervention>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityIntervention, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityIntervention>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityIntervention.GetIntervention(c));
     _EntityToDto = CreateMap <DocEntityIntervention, Intervention>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Intervention>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Intervention>(c, "Updated")))
                    .ForMember(dest => dest.DocumentSets, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Intervention>(c, nameof(DocEntityIntervention.DocumentSets))))
                    .ForMember(dest => dest.DocumentSetsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Intervention>(c, nameof(DocEntityIntervention.DocumentSetsCount))))
                    .ForMember(dest => dest.Name, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Intervention>(c, nameof(DocEntityIntervention.Name))))
                    .ForMember(dest => dest.URI, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Intervention>(c, nameof(DocEntityIntervention.URI))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <Intervention, DocEntityIntervention>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #9
0
 public TagMapper()
 {
     CreateMap <DocEntitySet <DocEntityTag>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityTag, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityTag>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityTag.Get(c));
     _EntityToDto = CreateMap <DocEntityTag, Tag>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Tag>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Tag>(c, "Updated")))
                    .ForMember(dest => dest.Name, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Tag>(c, nameof(DocEntityTag.Name))))
                    .ForMember(dest => dest.Scopes, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Tag>(c, nameof(DocEntityTag.Scopes))))
                    .ForMember(dest => dest.ScopesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Tag>(c, nameof(DocEntityTag.ScopesCount))))
                    .ForMember(dest => dest.ScopesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Tag>(c, nameof(DocEntityTag.ScopesIds))))
                    .ForMember(dest => dest.URI, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Tag>(c, nameof(DocEntityTag.URI))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <Tag, DocEntityTag>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #10
0
 public BackgroundTaskMapper()
 {
     CreateMap <DocEntitySet <DocEntityBackgroundTask>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityBackgroundTask, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityBackgroundTask>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityBackgroundTask.Get(c));
     _EntityToDto = CreateMap <DocEntityBackgroundTask, BackgroundTask>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, "Updated")))
                    .ForMember(dest => dest.App, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.App))))
                    .ForMember(dest => dest.AppId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.AppId))))
                    .ForMember(dest => dest.Channel, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.Channel))))
                    .ForMember(dest => dest.ChannelId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.ChannelId))))
                    .ForMember(dest => dest.Description, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.Description))))
                    .ForMember(dest => dest.Enabled, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.Enabled))))
                    .ForMember(dest => dest.Frequency, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.Frequency))))
                    .ForMember(dest => dest.HistoryRetention, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.HistoryRetention))))
                    .ForMember(dest => dest.Items, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.Items))))
                    .ForMember(dest => dest.ItemsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.ItemsCount))))
                    .ForMember(dest => dest.ItemsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.ItemsIds))))
                    .ForMember(dest => dest.KeepHistory, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.KeepHistory))))
                    .ForMember(dest => dest.LastRunVersion, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.LastRunVersion))))
                    .ForMember(dest => dest.LogError, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.LogError))))
                    .ForMember(dest => dest.LogInfo, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.LogInfo))))
                    .ForMember(dest => dest.Name, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.Name))))
                    .ForMember(dest => dest.RowsToProcessPerIteration, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.RowsToProcessPerIteration))))
                    .ForMember(dest => dest.RunNow, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.RunNow))))
                    .ForMember(dest => dest.StartAt, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.StartAt))))
                    .ForMember(dest => dest.TaskHistory, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.TaskHistory))))
                    .ForMember(dest => dest.TaskHistoryCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.TaskHistoryCount))))
                    .ForMember(dest => dest.TaskHistoryIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTask>(c, nameof(DocEntityBackgroundTask.TaskHistoryIds))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <BackgroundTask, DocEntityBackgroundTask>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #11
0
 public ReleaseStatusMapper()
 {
     CreateMap <DocEntitySet <DocEntityReleaseStatus>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityReleaseStatus, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityReleaseStatus>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityReleaseStatus.GetReleaseStatus(c));
     _EntityToDto = CreateMap <DocEntityReleaseStatus, ReleaseStatus>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ReleaseStatus>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ReleaseStatus>(c, "Updated")))
                    .ForMember(dest => dest.Branch, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ReleaseStatus>(c, nameof(DocEntityReleaseStatus.Branch))))
                    .ForMember(dest => dest.Release, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ReleaseStatus>(c, nameof(DocEntityReleaseStatus.Release))))
                    .ForMember(dest => dest.Server, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ReleaseStatus>(c, nameof(DocEntityReleaseStatus.Server))))
                    .ForMember(dest => dest.URL, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ReleaseStatus>(c, nameof(DocEntityReleaseStatus.URL))))
                    .ForMember(dest => dest.Version, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ReleaseStatus>(c, nameof(DocEntityReleaseStatus.Version))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <ReleaseStatus, DocEntityReleaseStatus>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
 public WorkflowCommentMapper()
 {
     CreateMap <DocEntitySet <DocEntityWorkflowComment>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityWorkflowComment, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityWorkflowComment>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityWorkflowComment.GetWorkflowComment(c));
     _EntityToDto = CreateMap <DocEntityWorkflowComment, WorkflowComment>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, "Updated")))
                    .ForMember(dest => dest.Children, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, nameof(DocEntityWorkflowComment.Children))))
                    .ForMember(dest => dest.ChildrenCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, nameof(DocEntityWorkflowComment.ChildrenCount))))
                    .ForMember(dest => dest.Parent, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, nameof(DocEntityWorkflowComment.Parent))))
                    .ForMember(dest => dest.ParentId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, nameof(DocEntityWorkflowComment.ParentId))))
                    .ForMember(dest => dest.Text, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, nameof(DocEntityWorkflowComment.Text))))
                    .ForMember(dest => dest.User, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, nameof(DocEntityWorkflowComment.User))))
                    .ForMember(dest => dest.UserId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, nameof(DocEntityWorkflowComment.UserId))))
                    .ForMember(dest => dest.Workflow, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, nameof(DocEntityWorkflowComment.Workflow))))
                    .ForMember(dest => dest.WorkflowId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowComment>(c, nameof(DocEntityWorkflowComment.WorkflowId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <WorkflowComment, DocEntityWorkflowComment>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #13
0
        public TherapeuticAreaSetMapper()
        {
            CreateMap <DocEntitySet <DocEntityTherapeuticAreaSet>, List <Reference> >()
            .ConvertUsing(s => s.ToReferences());
            CreateMap <DocEntityTherapeuticAreaSet, Reference>()
            .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
            CreateMap <Reference, DocEntityTherapeuticAreaSet>()
            .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
            .ConstructUsing(c => DocEntityTherapeuticAreaSet.Get(c));
            _EntityToDto = CreateMap <DocEntityTherapeuticAreaSet, TherapeuticAreaSet>()
                           .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TherapeuticAreaSet>(c, "Created")))
                           .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TherapeuticAreaSet>(c, "Updated")))

                           .MaxDepth(2);
            _DtoToEntity = CreateMap <TherapeuticAreaSet, DocEntityTherapeuticAreaSet>()
                           .MaxDepth(2);
            ApplyCustomMaps();
        }
예제 #14
0
 public LibrarySetMapper()
 {
     CreateMap <DocEntitySet <DocEntityLibrarySet>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityLibrarySet, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityLibrarySet>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityLibrarySet.Get(c));
     _EntityToDto = CreateMap <DocEntityLibrarySet, LibrarySet>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, "Updated")))
                    .ForMember(dest => dest.AdditionalCriteria, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.AdditionalCriteria))))
                    .ForMember(dest => dest.Characteristics, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.Characteristics))))
                    .ForMember(dest => dest.CharacteristicsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.CharacteristicsCount))))
                    .ForMember(dest => dest.CharacteristicsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.CharacteristicsIds))))
                    .ForMember(dest => dest.Comparators, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.Comparators))))
                    .ForMember(dest => dest.ComparatorsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.ComparatorsCount))))
                    .ForMember(dest => dest.ComparatorsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.ComparatorsIds))))
                    .ForMember(dest => dest.GeneralScope, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.GeneralScope))))
                    .ForMember(dest => dest.Indications, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.Indications))))
                    .ForMember(dest => dest.Interventions, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.Interventions))))
                    .ForMember(dest => dest.InterventionsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.InterventionsCount))))
                    .ForMember(dest => dest.InterventionsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.InterventionsIds))))
                    .ForMember(dest => dest.LibraryPackageId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.LibraryPackageId))))
                    .ForMember(dest => dest.Notes, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.Notes))))
                    .ForMember(dest => dest.OriginalComparators, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.OriginalComparators))))
                    .ForMember(dest => dest.OriginalDesigns, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.OriginalDesigns))))
                    .ForMember(dest => dest.OriginalInterventions, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.OriginalInterventions))))
                    .ForMember(dest => dest.OriginalOutcomes, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.OriginalOutcomes))))
                    .ForMember(dest => dest.OriginalSearch, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.OriginalSearch))))
                    .ForMember(dest => dest.Outcomes, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.Outcomes))))
                    .ForMember(dest => dest.OutcomesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.OutcomesCount))))
                    .ForMember(dest => dest.OutcomesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.OutcomesIds))))
                    .ForMember(dest => dest.Participants, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.Participants))))
                    .ForMember(dest => dest.Projects, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.Projects))))
                    .ForMember(dest => dest.ProjectsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.ProjectsCount))))
                    .ForMember(dest => dest.ProjectsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.ProjectsIds))))
                    .ForMember(dest => dest.SearchEnd, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.SearchEnd))))
                    .ForMember(dest => dest.SearchStart, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.SearchStart))))
                    .ForMember(dest => dest.SearchStrategy, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.SearchStrategy))))
                    .ForMember(dest => dest.SearchUpdated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.SearchUpdated))))
                    .ForMember(dest => dest.SelectionCriteria, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.SelectionCriteria))))
                    .ForMember(dest => dest.StudyDesigns, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.StudyDesigns))))
                    .ForMember(dest => dest.StudyDesignsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.StudyDesignsCount))))
                    .ForMember(dest => dest.StudyDesignsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.StudyDesignsIds))))
                    .ForMember(dest => dest.UpdateFrequency, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <LibrarySet>(c, nameof(DocEntityLibrarySet.UpdateFrequency))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <LibrarySet, DocEntityLibrarySet>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #15
0
 public FeatureSetMapper()
 {
     CreateMap <DocEntitySet <DocEntityFeatureSet>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityFeatureSet, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityFeatureSet>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityFeatureSet.Get(c));
     _EntityToDto = CreateMap <DocEntityFeatureSet, FeatureSet>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <FeatureSet>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <FeatureSet>(c, "Updated")))
                    .ForMember(dest => dest.Description, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <FeatureSet>(c, nameof(DocEntityFeatureSet.Description))))
                    .ForMember(dest => dest.Name, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <FeatureSet>(c, nameof(DocEntityFeatureSet.Name))))
                    .ForMember(dest => dest.PermissionTemplate, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <FeatureSet>(c, nameof(DocEntityFeatureSet.PermissionTemplate))))
                    .ForMember(dest => dest.Roles, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <FeatureSet>(c, nameof(DocEntityFeatureSet.Roles))))
                    .ForMember(dest => dest.RolesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <FeatureSet>(c, nameof(DocEntityFeatureSet.RolesCount))))
                    .ForMember(dest => dest.RolesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <FeatureSet>(c, nameof(DocEntityFeatureSet.RolesIds))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <FeatureSet, DocEntityFeatureSet>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #16
0
 public BackgroundTaskHistoryMapper()
 {
     CreateMap <DocEntitySet <DocEntityBackgroundTaskHistory>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityBackgroundTaskHistory, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityBackgroundTaskHistory>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityBackgroundTaskHistory.Get(c));
     _EntityToDto = CreateMap <DocEntityBackgroundTaskHistory, BackgroundTaskHistory>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, "Updated")))
                    .ForMember(dest => dest.Completed, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.Completed))))
                    .ForMember(dest => dest.Data, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.Data))))
                    .ForMember(dest => dest.Ended, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.Ended))))
                    .ForMember(dest => dest.Errors, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.Errors))))
                    .ForMember(dest => dest.Failed, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.Failed))))
                    .ForMember(dest => dest.Items, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.Items))))
                    .ForMember(dest => dest.ItemsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.ItemsCount))))
                    .ForMember(dest => dest.ItemsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.ItemsIds))))
                    .ForMember(dest => dest.Logs, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.Logs))))
                    .ForMember(dest => dest.Succeeded, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.Succeeded))))
                    .ForMember(dest => dest.Summary, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.Summary))))
                    .ForMember(dest => dest.Task, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.Task))))
                    .ForMember(dest => dest.TaskId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <BackgroundTaskHistory>(c, nameof(DocEntityBackgroundTaskHistory.TaskId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <BackgroundTaskHistory, DocEntityBackgroundTaskHistory>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #17
0
 public UnitOfMeasureMapper()
 {
     CreateMap <DocEntitySet <DocEntityUnitOfMeasure>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityUnitOfMeasure, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityUnitOfMeasure>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityUnitOfMeasure.Get(c));
     _EntityToDto = CreateMap <DocEntityUnitOfMeasure, UnitOfMeasure>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitOfMeasure>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitOfMeasure>(c, "Updated")))
                    .ForMember(dest => dest.IsSI, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitOfMeasure>(c, nameof(DocEntityUnitOfMeasure.IsSI))))
                    .ForMember(dest => dest.Name, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitOfMeasure>(c, nameof(DocEntityUnitOfMeasure.Name))))
                    .ForMember(dest => dest.NameId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitOfMeasure>(c, nameof(DocEntityUnitOfMeasure.NameId))))
                    .ForMember(dest => dest.Type, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitOfMeasure>(c, nameof(DocEntityUnitOfMeasure.Type))))
                    .ForMember(dest => dest.Type_Id, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitOfMeasure>(c, nameof(DocEntityUnitOfMeasure.Type_Id))))
                    .ForMember(dest => dest.Unit, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitOfMeasure>(c, nameof(DocEntityUnitOfMeasure.Unit))))
                    .ForMember(dest => dest.UnitId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitOfMeasure>(c, nameof(DocEntityUnitOfMeasure.UnitId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <UnitOfMeasure, DocEntityUnitOfMeasure>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #18
0
 public DataPropertyMapper()
 {
     CreateMap <DocEntitySet <DocEntityDataProperty>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityDataProperty, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityDataProperty>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityDataProperty.Get(c));
     _EntityToDto = CreateMap <DocEntityDataProperty, DataProperty>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, "Updated")))
                    .ForMember(dest => dest.AutoCreateMissing, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.AutoCreateMissing))))
                    .ForMember(dest => dest.Children, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Children))))
                    .ForMember(dest => dest.ChildrenCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.ChildrenCount))))
                    .ForMember(dest => dest.ChildrenIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.ChildrenIds))))
                    .ForMember(dest => dest.Class, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Class))))
                    .ForMember(dest => dest.ClassId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.ClassId))))
                    .ForMember(dest => dest.Description, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Description))))
                    .ForMember(dest => dest.DisplayName, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.DisplayName))))
                    .ForMember(dest => dest.IsAllowAddInForm, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsAllowAddInForm))))
                    .ForMember(dest => dest.IsAllowCreateInForm, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsAllowCreateInForm))))
                    .ForMember(dest => dest.IsAllowEditInForm, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsAllowEditInForm))))
                    .ForMember(dest => dest.IsAllowFreeText, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsAllowFreeText))))
                    .ForMember(dest => dest.IsAllowRemoveInForm, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsAllowRemoveInForm))))
                    .ForMember(dest => dest.IsAudited, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsAudited))))
                    .ForMember(dest => dest.IsCompressed, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsCompressed))))
                    .ForMember(dest => dest.IsDisplayInForm, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsDisplayInForm))))
                    .ForMember(dest => dest.IsDisplayInGrid, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsDisplayInGrid))))
                    .ForMember(dest => dest.IsEditColumn, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsEditColumn))))
                    .ForMember(dest => dest.IsInsertOnly, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsInsertOnly))))
                    .ForMember(dest => dest.IsJSON, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsJSON))))
                    .ForMember(dest => dest.IsLazy, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsLazy))))
                    .ForMember(dest => dest.IsNullOnUpgrade, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsNullOnUpgrade))))
                    .ForMember(dest => dest.IsReadOnly, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsReadOnly))))
                    .ForMember(dest => dest.IsRelationship, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsRelationship))))
                    .ForMember(dest => dest.IsRequired, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsRequired))))
                    .ForMember(dest => dest.IsRequiredInForm, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsRequiredInForm))))
                    .ForMember(dest => dest.IsVirtual, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.IsVirtual))))
                    .ForMember(dest => dest.JsonType, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.JsonType))))
                    .ForMember(dest => dest.LookupTableEnum, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.LookupTableEnum))))
                    .ForMember(dest => dest.LookupTableEnumId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.LookupTableEnumId))))
                    .ForMember(dest => dest.Name, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Name))))
                    .ForMember(dest => dest.Order, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Order))))
                    .ForMember(dest => dest.Owner, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Owner))))
                    .ForMember(dest => dest.OwnerId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.OwnerId))))
                    .ForMember(dest => dest.Precision, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Precision))))
                    .ForMember(dest => dest.RelationshipOnOwnerRemove, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.RelationshipOnOwnerRemove))))
                    .ForMember(dest => dest.RelationshipOnTargetRemove, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.RelationshipOnTargetRemove))))
                    .ForMember(dest => dest.RelationshipPairTo, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.RelationshipPairTo))))
                    .ForMember(dest => dest.RelationshipPairToId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.RelationshipPairToId))))
                    .ForMember(dest => dest.Scale, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Scale))))
                    .ForMember(dest => dest.SetDefaultValue, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.SetDefaultValue))))
                    .ForMember(dest => dest.Tab, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Tab))))
                    .ForMember(dest => dest.TabId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.TabId))))
                    .ForMember(dest => dest.Target, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Target))))
                    .ForMember(dest => dest.TargetId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.TargetId))))
                    .ForMember(dest => dest.TargetAlias, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.TargetAlias))))
                    .ForMember(dest => dest.Type, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.Type))))
                    .ForMember(dest => dest.UIType, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <DataProperty>(c, nameof(DocEntityDataProperty.UIType))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <DataProperty, DocEntityDataProperty>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #19
0
 public ClientMapper()
 {
     CreateMap <DocEntitySet <DocEntityClient>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityClient, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityClient>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityClient.Get(c));
     _EntityToDto = CreateMap <DocEntityClient, Client>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, "Updated")))
                    .ForMember(dest => dest.DefaultLocale, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.DefaultLocale))))
                    .ForMember(dest => dest.DefaultLocaleId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.DefaultLocaleId))))
                    .ForMember(dest => dest.Divisions, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.Divisions))))
                    .ForMember(dest => dest.DivisionsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.DivisionsCount))))
                    .ForMember(dest => dest.DivisionsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.DivisionsIds))))
                    .ForMember(dest => dest.DocumentSets, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.DocumentSets))))
                    .ForMember(dest => dest.DocumentSetsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.DocumentSetsCount))))
                    .ForMember(dest => dest.DocumentSetsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.DocumentSetsIds))))
                    .ForMember(dest => dest.Name, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.Name))))
                    .ForMember(dest => dest.Projects, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.Projects))))
                    .ForMember(dest => dest.ProjectsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.ProjectsCount))))
                    .ForMember(dest => dest.ProjectsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.ProjectsIds))))
                    .ForMember(dest => dest.Role, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.Role))))
                    .ForMember(dest => dest.RoleId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.RoleId))))
                    .ForMember(dest => dest.SalesforceAccountId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.SalesforceAccountId))))
                    .ForMember(dest => dest.Scopes, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.Scopes))))
                    .ForMember(dest => dest.ScopesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.ScopesCount))))
                    .ForMember(dest => dest.ScopesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.ScopesIds))))
                    .ForMember(dest => dest.Settings, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Client>(c, nameof(DocEntityClient.Settings))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <Client, DocEntityClient>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #20
0
 public JunctionMapper()
 {
     CreateMap <DocEntitySet <DocEntityJunction>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityJunction, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityJunction>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityJunction.Get(c));
     _EntityToDto = CreateMap <DocEntityJunction, Junction>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, "Updated")))
                    .ForMember(dest => dest.Children, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.Children))))
                    .ForMember(dest => dest.ChildrenCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.ChildrenCount))))
                    .ForMember(dest => dest.ChildrenIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.ChildrenIds))))
                    .ForMember(dest => dest.Data, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.Data))))
                    .ForMember(dest => dest.OwnerId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.OwnerId))))
                    .ForMember(dest => dest.OwnerType, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.OwnerType))))
                    .ForMember(dest => dest.Parent, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.Parent))))
                    .ForMember(dest => dest.ParentId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.ParentId))))
                    .ForMember(dest => dest.TargetId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.TargetId))))
                    .ForMember(dest => dest.TargetType, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.TargetType))))
                    .ForMember(dest => dest.Type, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.Type))))
                    .ForMember(dest => dest.Type_Id, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.Type_Id))))
                    .ForMember(dest => dest.User, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.User))))
                    .ForMember(dest => dest.UserId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Junction>(c, nameof(DocEntityJunction.UserId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <Junction, DocEntityJunction>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #21
0
 public IntervalMapper()
 {
     CreateMap <DocEntitySet <DocEntityInterval>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityInterval, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityInterval>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityInterval.Get(c));
     _EntityToDto = CreateMap <DocEntityInterval, Interval>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, "Updated")))
                    .ForMember(dest => dest.CalendarDateEnd, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, nameof(DocEntityInterval.CalendarDateEnd))))
                    .ForMember(dest => dest.CalendarDateEndId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, nameof(DocEntityInterval.CalendarDateEndId))))
                    .ForMember(dest => dest.CalendarDateStart, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, nameof(DocEntityInterval.CalendarDateStart))))
                    .ForMember(dest => dest.CalendarDateStartId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, nameof(DocEntityInterval.CalendarDateStartId))))
                    .ForMember(dest => dest.CalendarType, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, nameof(DocEntityInterval.CalendarType))))
                    .ForMember(dest => dest.FollowUp, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, nameof(DocEntityInterval.FollowUp))))
                    .ForMember(dest => dest.FollowUpId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, nameof(DocEntityInterval.FollowUpId))))
                    .ForMember(dest => dest.TimeOfDay, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, nameof(DocEntityInterval.TimeOfDay))))
                    .ForMember(dest => dest.TimeOfDayId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <Interval>(c, nameof(DocEntityInterval.TimeOfDayId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <Interval, DocEntityInterval>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #22
0
 public AdjudicatedRatingMapper()
 {
     CreateMap <DocEntitySet <DocEntityAdjudicatedRating>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityAdjudicatedRating, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityAdjudicatedRating>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityAdjudicatedRating.Get(c));
     _EntityToDto = CreateMap <DocEntityAdjudicatedRating, AdjudicatedRating>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <AdjudicatedRating>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <AdjudicatedRating>(c, "Updated")))
                    .ForMember(dest => dest.Document, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <AdjudicatedRating>(c, nameof(DocEntityAdjudicatedRating.Document))))
                    .ForMember(dest => dest.DocumentId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <AdjudicatedRating>(c, nameof(DocEntityAdjudicatedRating.DocumentId))))
                    .ForMember(dest => dest.Rating, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <AdjudicatedRating>(c, nameof(DocEntityAdjudicatedRating.Rating))))
                    .ForMember(dest => dest.ReasonRejected, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <AdjudicatedRating>(c, nameof(DocEntityAdjudicatedRating.ReasonRejected))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <AdjudicatedRating, DocEntityAdjudicatedRating>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #23
0
 public ServePortalSetMapper()
 {
     CreateMap <DocEntitySet <DocEntityServePortalSet>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityServePortalSet, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityServePortalSet>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityServePortalSet.Get(c));
     _EntityToDto = CreateMap <DocEntityServePortalSet, ServePortalSet>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ServePortalSet>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ServePortalSet>(c, "Updated")))
                    .ForMember(dest => dest.DrugClasses, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ServePortalSet>(c, nameof(DocEntityServePortalSet.DrugClasses))))
                    .ForMember(dest => dest.DrugClassesCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ServePortalSet>(c, nameof(DocEntityServePortalSet.DrugClassesCount))))
                    .ForMember(dest => dest.DrugClassesIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ServePortalSet>(c, nameof(DocEntityServePortalSet.DrugClassesIds))))
                    .ForMember(dest => dest.Interventions, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ServePortalSet>(c, nameof(DocEntityServePortalSet.Interventions))))
                    .ForMember(dest => dest.InterventionsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ServePortalSet>(c, nameof(DocEntityServePortalSet.InterventionsCount))))
                    .ForMember(dest => dest.InterventionsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ServePortalSet>(c, nameof(DocEntityServePortalSet.InterventionsIds))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <ServePortalSet, DocEntityServePortalSet>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #24
0
 public StudyDesignMapper()
 {
     CreateMap <DocEntitySet <DocEntityStudyDesign>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityStudyDesign, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityStudyDesign>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityStudyDesign.Get(c));
     _EntityToDto = CreateMap <DocEntityStudyDesign, StudyDesign>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StudyDesign>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StudyDesign>(c, "Updated")))
                    .ForMember(dest => dest.Design, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StudyDesign>(c, nameof(DocEntityStudyDesign.Design))))
                    .ForMember(dest => dest.DesignId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StudyDesign>(c, nameof(DocEntityStudyDesign.DesignId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <StudyDesign, DocEntityStudyDesign>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #25
0
 public TimePointMapper()
 {
     CreateMap <DocEntitySet <DocEntityTimePoint>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityTimePoint, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityTimePoint>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityTimePoint.Get(c));
     _EntityToDto = CreateMap <DocEntityTimePoint, TimePoint>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimePoint>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimePoint>(c, "Updated")))
                    .ForMember(dest => dest.IsAbsolute, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimePoint>(c, nameof(DocEntityTimePoint.IsAbsolute))))
                    .ForMember(dest => dest.MeanValue, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimePoint>(c, nameof(DocEntityTimePoint.MeanValue))))
                    .ForMember(dest => dest.SingleValue, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimePoint>(c, nameof(DocEntityTimePoint.SingleValue))))
                    .ForMember(dest => dest.TotalValue, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimePoint>(c, nameof(DocEntityTimePoint.TotalValue))))
                    .ForMember(dest => dest.Type, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimePoint>(c, nameof(DocEntityTimePoint.Type))))
                    .ForMember(dest => dest.Type_Id, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <TimePoint>(c, nameof(DocEntityTimePoint.Type_Id))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <TimePoint, DocEntityTimePoint>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #26
0
 public StatsStudySetMapper()
 {
     CreateMap <DocEntitySet <DocEntityStatsStudySet>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityStatsStudySet, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityStatsStudySet>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityStatsStudySet.Get(c));
     _EntityToDto = CreateMap <DocEntityStatsStudySet, StatsStudySet>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, "Updated")))
                    .ForMember(dest => dest.BoundTerms, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.BoundTerms))))
                    .ForMember(dest => dest.Characteristics, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.Characteristics))))
                    .ForMember(dest => dest.DataPoints, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.DataPoints))))
                    .ForMember(dest => dest.DesignCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.DesignCount))))
                    .ForMember(dest => dest.DesignList, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.DesignList))))
                    .ForMember(dest => dest.DocumentSet, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.DocumentSet))))
                    .ForMember(dest => dest.DocumentSetId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.DocumentSetId))))
                    .ForMember(dest => dest.Interventions, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.Interventions))))
                    .ForMember(dest => dest.Outcomes, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.Outcomes))))
                    .ForMember(dest => dest.OutcomesReported, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.OutcomesReported))))
                    .ForMember(dest => dest.Records, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.Records))))
                    .ForMember(dest => dest.RecordsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.RecordsCount))))
                    .ForMember(dest => dest.RecordsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.RecordsIds))))
                    .ForMember(dest => dest.Stat, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.Stat))))
                    .ForMember(dest => dest.StatId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.StatId))))
                    .ForMember(dest => dest.Studies, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.Studies))))
                    .ForMember(dest => dest.TypeCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.TypeCount))))
                    .ForMember(dest => dest.TypeList, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.TypeList))))
                    .ForMember(dest => dest.UnboundTerms, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <StatsStudySet>(c, nameof(DocEntityStatsStudySet.UnboundTerms))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <StatsStudySet, DocEntityStatsStudySet>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
 public UnitConversionRulesMapper()
 {
     CreateMap <DocEntitySet <DocEntityUnitConversionRules>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityUnitConversionRules, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityUnitConversionRules>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityUnitConversionRules.Get(c));
     _EntityToDto = CreateMap <DocEntityUnitConversionRules, UnitConversionRules>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, "Updated")))
                    .ForMember(dest => dest.DestinationUnit, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.DestinationUnit))))
                    .ForMember(dest => dest.DestinationUnitId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.DestinationUnitId))))
                    .ForMember(dest => dest.IsDefault, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.IsDefault))))
                    .ForMember(dest => dest.IsDestinationSi, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.IsDestinationSi))))
                    .ForMember(dest => dest.ModifierTerm, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.ModifierTerm))))
                    .ForMember(dest => dest.ModifierTermId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.ModifierTermId))))
                    .ForMember(dest => dest.Multiplier, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.Multiplier))))
                    .ForMember(dest => dest.Parent, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.Parent))))
                    .ForMember(dest => dest.ParentId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.ParentId))))
                    .ForMember(dest => dest.RootTerm, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.RootTerm))))
                    .ForMember(dest => dest.RootTermId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.RootTermId))))
                    .ForMember(dest => dest.SourceUnit, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.SourceUnit))))
                    .ForMember(dest => dest.SourceUnitId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UnitConversionRules>(c, nameof(DocEntityUnitConversionRules.SourceUnitId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <UnitConversionRules, DocEntityUnitConversionRules>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #28
0
 public UserSessionMapper()
 {
     CreateMap <DocEntitySet <DocEntityUserSession>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityUserSession, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityUserSession>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityUserSession.Get(c));
     _EntityToDto = CreateMap <DocEntityUserSession, UserSession>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, "Updated")))
                    .ForMember(dest => dest.ClientId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.ClientId))))
                    .ForMember(dest => dest.Hits, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.Hits))))
                    .ForMember(dest => dest.Impersonations, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.Impersonations))))
                    .ForMember(dest => dest.ImpersonationsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.ImpersonationsCount))))
                    .ForMember(dest => dest.ImpersonationsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.ImpersonationsIds))))
                    .ForMember(dest => dest.IpAddress, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.IpAddress))))
                    .ForMember(dest => dest.Requests, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.Requests))))
                    .ForMember(dest => dest.RequestsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.RequestsCount))))
                    .ForMember(dest => dest.RequestsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.RequestsIds))))
                    .ForMember(dest => dest.SessionId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.SessionId))))
                    .ForMember(dest => dest.TemporarySessionId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.TemporarySessionId))))
                    .ForMember(dest => dest.User, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.User))))
                    .ForMember(dest => dest.UserId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.UserId))))
                    .ForMember(dest => dest.UserHistory, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.UserHistory))))
                    .ForMember(dest => dest.UserHistoryCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.UserHistoryCount))))
                    .ForMember(dest => dest.UserHistoryIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <UserSession>(c, nameof(DocEntityUserSession.UserHistoryIds))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <UserSession, DocEntityUserSession>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #29
0
 public ImportDataMapper()
 {
     CreateMap <DocEntitySet <DocEntityImportData>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityImportData, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityImportData>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityImportData.Get(c));
     _EntityToDto = CreateMap <DocEntityImportData, ImportData>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, "Updated")))
                    .ForMember(dest => dest.CompletedOn, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.CompletedOn))))
                    .ForMember(dest => dest.DataSets, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.DataSets))))
                    .ForMember(dest => dest.DataSetsCount, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.DataSetsCount))))
                    .ForMember(dest => dest.DataSetsIds, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.DataSetsIds))))
                    .ForMember(dest => dest.Document, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.Document))))
                    .ForMember(dest => dest.DocumentId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.DocumentId))))
                    .ForMember(dest => dest.ErrorData, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ErrorData))))
                    .ForMember(dest => dest.ExtractUrl, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ExtractUrl))))
                    .ForMember(dest => dest.HighPriority, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.HighPriority))))
                    .ForMember(dest => dest.ImportFr, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ImportFr))))
                    .ForMember(dest => dest.ImportLocation, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ImportLocation))))
                    .ForMember(dest => dest.ImportLocationId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ImportLocationId))))
                    .ForMember(dest => dest.ImportNewName, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ImportNewName))))
                    .ForMember(dest => dest.ImportTable, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ImportTable))))
                    .ForMember(dest => dest.ImportText, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ImportText))))
                    .ForMember(dest => dest.ImportType, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ImportType))))
                    .ForMember(dest => dest.ImportTypeId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ImportTypeId))))
                    .ForMember(dest => dest.IsLegacy, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.IsLegacy))))
                    .ForMember(dest => dest.Order, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.Order))))
                    .ForMember(dest => dest.ReferenceId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.ReferenceId))))
                    .ForMember(dest => dest.RequestedBy, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.RequestedBy))))
                    .ForMember(dest => dest.RequestedById, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.RequestedById))))
                    .ForMember(dest => dest.RequestedOn, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.RequestedOn))))
                    .ForMember(dest => dest.StartedOn, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.StartedOn))))
                    .ForMember(dest => dest.Status, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.Status))))
                    .ForMember(dest => dest.StatusId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <ImportData>(c, nameof(DocEntityImportData.StatusId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <ImportData, DocEntityImportData>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }
예제 #30
0
 public WorkflowTaskMapper()
 {
     CreateMap <DocEntitySet <DocEntityWorkflowTask>, List <Reference> >()
     .ConvertUsing(s => s.ToReferences());
     CreateMap <DocEntityWorkflowTask, Reference>()
     .ConstructUsing(s => null == s || !(s.Id > 0) ? null : s.ToReference());
     CreateMap <Reference, DocEntityWorkflowTask>()
     .ForMember(dest => dest.Id, opt => opt.Condition(src => null != src && src.Id > 0))
     .ConstructUsing(c => DocEntityWorkflowTask.GetWorkflowTask(c));
     _EntityToDto = CreateMap <DocEntityWorkflowTask, WorkflowTask>()
                    .ForMember(dest => dest.Created, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, "Created")))
                    .ForMember(dest => dest.Updated, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, "Updated")))
                    .ForMember(dest => dest.Assignee, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.Assignee))))
                    .ForMember(dest => dest.AssigneeId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.AssigneeId))))
                    .ForMember(dest => dest.Data, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.Data))))
                    .ForMember(dest => dest.Description, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.Description))))
                    .ForMember(dest => dest.DueDate, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.DueDate))))
                    .ForMember(dest => dest.Reporter, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.Reporter))))
                    .ForMember(dest => dest.ReporterId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.ReporterId))))
                    .ForMember(dest => dest.Status, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.Status))))
                    .ForMember(dest => dest.StatusId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.StatusId))))
                    .ForMember(dest => dest.Type, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.Type))))
                    .ForMember(dest => dest.TypeId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.TypeId))))
                    .ForMember(dest => dest.Workflow, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.Workflow))))
                    .ForMember(dest => dest.WorkflowId, opt => opt.PreCondition(c => DocMapperConfig.ShouldBeMapped <WorkflowTask>(c, nameof(DocEntityWorkflowTask.WorkflowId))))
                    .MaxDepth(2);
     _DtoToEntity = CreateMap <WorkflowTask, DocEntityWorkflowTask>()
                    .MaxDepth(2);
     ApplyCustomMaps();
 }