public SchemeDefinition <XElement> GetProcessSchemeBySchemeId(Guid schemeId) { using (var connection = new NpgsqlConnection(ConnectionString)) { var processScheme = WorkflowProcessScheme.SelectByKey(connection, schemeId); if (processScheme == null || string.IsNullOrEmpty(processScheme.Scheme)) { throw SchemeNotFoundException.Create(schemeId, SchemeLocation.WorkflowProcessScheme); } return(ConvertToSchemeDefinition(processScheme)); } }
public SchemeDefinition <XElement> GetProcessSchemeBySchemeId(Guid schemeId) { using (NpgsqlConnection connection = new NpgsqlConnection(ConnectionString)) { WorkflowProcessScheme processScheme = WorkflowProcessScheme.SelectByKey(connection, schemeId); if (processScheme == null || string.IsNullOrEmpty(processScheme.Scheme)) { throw new SchemeNotFoundException(); } return(new SchemeDefinition <XElement>(schemeId, processScheme.SchemeCode, XElement.Parse(processScheme.Scheme), processScheme.IsObsolete)); } }