Ejemplo n.º 1
0
        internal static IDbConnection CreateWorkflowConnection()
        {
            SmartflowConfiguration config = ConfigurationManager.GetSection("smartflowConfiguration") as
                                            SmartflowConfiguration;

            return(DapperFactory.CreateConnection(config.ProviderName, config.ConnectionString));
        }
Ejemplo n.º 2
0
        public static IDbConnection CreateWorkflowConnection()
        {
            SmartflowConfiguration config = ConfigurationManager.GetSection("smartflowConfiguration") as
                                            SmartflowConfiguration;

            Assert.CheckNull(config, "SmartflowConfiguration");
            return(DapperFactory.CreateConnection(config.ProviderName, config.ConnectionString));
        }
Ejemplo n.º 3
0
        public static IDbConnection CreateWorkflowConnection()
        {
            SmartflowConfiguration config = ConfigurationManager.GetSection("smartflowConfiguration") as SmartflowConfiguration;

            Assert.CheckNull(config, "smartflowConfiguration");
            Assert.StringNull(config.ConnectionString, "ConnectionString");
            Assert.StringNull(config.DatabaseCategory, "DatabaseCategory");

            DatabaseCategory dbc;

            if (Enum.TryParse(config.DatabaseCategory, true, out dbc) || String.IsNullOrEmpty(config.ConnectionString))
            {
                return(DapperFactory.CreateConnection(dbc, config.ConnectionString));
            }
            else
            {
                throw new WorkflowException(ResourceManage.GetString(ResourceManage.CONNECTION_CONFIG));
            }
        }