コード例 #1
0
        public virtual ApiNuGetPackageResponseModel MapBOToModel(
            BONuGetPackage boNuGetPackage)
        {
            var model = new ApiNuGetPackageResponseModel();

            model.SetProperties(boNuGetPackage.Id, boNuGetPackage.JSON, boNuGetPackage.PackageId, boNuGetPackage.Version, boNuGetPackage.VersionBuild, boNuGetPackage.VersionMajor, boNuGetPackage.VersionMinor, boNuGetPackage.VersionRevision, boNuGetPackage.VersionSpecial);

            return(model);
        }
コード例 #2
0
        public virtual BONuGetPackage MapEFToBO(
            NuGetPackage ef)
        {
            var bo = new BONuGetPackage();

            bo.SetProperties(
                ef.Id,
                ef.JSON,
                ef.PackageId,
                ef.Version,
                ef.VersionBuild,
                ef.VersionMajor,
                ef.VersionMinor,
                ef.VersionRevision,
                ef.VersionSpecial);
            return(bo);
        }
コード例 #3
0
        public virtual NuGetPackage MapBOToEF(
            BONuGetPackage bo)
        {
            NuGetPackage efNuGetPackage = new NuGetPackage();

            efNuGetPackage.SetProperties(
                bo.Id,
                bo.JSON,
                bo.PackageId,
                bo.Version,
                bo.VersionBuild,
                bo.VersionMajor,
                bo.VersionMinor,
                bo.VersionRevision,
                bo.VersionSpecial);
            return(efNuGetPackage);
        }
コード例 #4
0
        public virtual BONuGetPackage MapModelToBO(
            string id,
            ApiNuGetPackageRequestModel model
            )
        {
            BONuGetPackage boNuGetPackage = new BONuGetPackage();

            boNuGetPackage.SetProperties(
                id,
                model.JSON,
                model.PackageId,
                model.Version,
                model.VersionBuild,
                model.VersionMajor,
                model.VersionMinor,
                model.VersionRevision,
                model.VersionSpecial);
            return(boNuGetPackage);
        }