public static AomObjectViewModel MapDbModelToViewModel(AomObject dbModel) { var viewModel = new AomObjectViewModel(); viewModel.ID = dbModel.ID; viewModel.AomMetaId = dbModel.AomMetaId; viewModel.Name = dbModel.Name; return(viewModel); }
public static AomObject MapInsertModelToDbModel(AomObjectViewModel model, AomObject newDomainModel = null) { if (newDomainModel == null) { newDomainModel = new AomObject(); } newDomainModel.ID = model.ID; newDomainModel.AomMetaId = model.AomMetaId; newDomainModel.Name = model.Name; return(newDomainModel); }