예제 #1
0
        public static AomFieldMetaViewModel MapDbModelToViewModel(AomFieldMeta dbModel)
        {
            var viewModel = new  AomFieldMetaViewModel();

            viewModel.ID          = dbModel.Id;
            viewModel.AomMetaId   = dbModel.AomMetaId;
            viewModel.Name        = dbModel.Name;
            viewModel.FieldTypeId = dbModel.FieldTypeId;
            return(viewModel);
        }
예제 #2
0
        public static AomFieldMeta MapInsertModelToDbModel(AomFieldMetaViewModel model, AomFieldMeta newDomainModel = null)
        {
            if (newDomainModel == null)
            {
                newDomainModel = new AomFieldMeta();
            }

            newDomainModel.Id          = model.ID;
            newDomainModel.AomMetaId   = model.AomMetaId;
            newDomainModel.Name        = model.Name;
            newDomainModel.FieldTypeId = model.FieldTypeId;

            return(newDomainModel);
        }