public IPKSimCommand Create <TMolecule>() where TMolecule : IndividualMolecule { //Just for edit ExpressionProfile = _expressionProfileFactory.Create <TMolecule>(); _dto = _expressionProfileDTOMapper.MapFrom(ExpressionProfile); _view.Caption = PKSimConstants.UI.CreateExpressionProfile; _view.BindTo(_dto); _view.Display(); if (_view.Canceled) { return(new PKSimEmptyCommand()); } //we create a new one with all new features ExpressionProfile = _expressionProfileFactory.Create <TMolecule>(_dto.Species, _dto.MoleculeName); ExpressionProfile.Category = _dto.Category; _moleculeParameterTask.SetDefaultFor(ExpressionProfile); //Action return(new PKSimMacroCommand()); }