示例#1
0
        public virtual ApiArtifactResponseModel MapBOToModel(
            BOArtifact boArtifact)
        {
            var model = new ApiArtifactResponseModel();

            model.SetProperties(boArtifact.Id, boArtifact.Created, boArtifact.EnvironmentId, boArtifact.Filename, boArtifact.JSON, boArtifact.ProjectId, boArtifact.RelatedDocumentIds, boArtifact.TenantId);

            return(model);
        }
        public virtual BOArtifact MapEFToBO(
            Artifact ef)
        {
            var bo = new BOArtifact();

            bo.SetProperties(
                ef.Id,
                ef.Created,
                ef.EnvironmentId,
                ef.Filename,
                ef.JSON,
                ef.ProjectId,
                ef.RelatedDocumentIds,
                ef.TenantId);
            return(bo);
        }
        public virtual Artifact MapBOToEF(
            BOArtifact bo)
        {
            Artifact efArtifact = new Artifact();

            efArtifact.SetProperties(
                bo.Created,
                bo.EnvironmentId,
                bo.Filename,
                bo.Id,
                bo.JSON,
                bo.ProjectId,
                bo.RelatedDocumentIds,
                bo.TenantId);
            return(efArtifact);
        }
示例#4
0
        public virtual BOArtifact MapModelToBO(
            string id,
            ApiArtifactRequestModel model
            )
        {
            BOArtifact boArtifact = new BOArtifact();

            boArtifact.SetProperties(
                id,
                model.Created,
                model.EnvironmentId,
                model.Filename,
                model.JSON,
                model.ProjectId,
                model.RelatedDocumentIds,
                model.TenantId);
            return(boArtifact);
        }