示例#1
0
        public static RelationshipObjectViewModel MapDbModelToViewModel(RelationshipObject dbModel)
        {
            var viewModel = new  RelationshipObjectViewModel();

            viewModel.ID = dbModel.ID;
            viewModel.RelationshipMetaId = dbModel.RelationshipMetaId;
            viewModel.PkAomFieldObjectId = dbModel.PkAomFieldObjectId;
            viewModel.FkAomFieldObjectId = dbModel.FkAomFieldObjectId;
            return(viewModel);
        }
示例#2
0
        public static RelationshipObject MapInsertModelToDbModel(RelationshipObjectViewModel model, RelationshipObject newDomainModel = null)
        {
            if (newDomainModel == null)
            {
                newDomainModel = new RelationshipObject();
            }

            newDomainModel.ID = model.ID;
            newDomainModel.RelationshipMetaId = model.RelationshipMetaId;
            newDomainModel.PkAomFieldObjectId = model.PkAomFieldObjectId;
            newDomainModel.FkAomFieldObjectId = model.FkAomFieldObjectId;

            return(newDomainModel);
        }