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); }
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); }