public ActionResult Create(CommerceInstanceEditorModel model, string @return) { var metadata = new CommerceInstanceSettings { Name = model.Name, DisplayName = model.DisplayName, DbSchema = model.DbSchema }; var dbProviderKeyParts = model.DbProviderKey.Split('|'); metadata.DbProviderInvariantName = dbProviderKeyParts[0]; metadata.DbProviderManifestToken = dbProviderKeyParts[1]; if (model.AdvancedMode) { metadata.ConnectionString = model.ConnectionString; } else { foreach (var param in model.ConnectionStringParameters) { metadata.ConnectionStringParameters.Add(param.Text, param.Value); } } _instanceManager.CreateInstance(metadata); return(AjaxForm().RedirectTo(@return)); }
public static string GetConnectionString(this ICommerceDbProvider dbProvider, CommerceInstanceSettings metadata) { if (String.IsNullOrEmpty(metadata.ConnectionString)) { return dbProvider.ConnectionStringBuilder.BuildConnectionString(metadata.ConnectionStringParameters); } return metadata.ConnectionString; }
public CommerceInstanceDeleted(string instanceName, CommerceInstanceSettings settings) { InstanceName = instanceName; Settings = settings; }
public CommerceInstanceDeleted(string instanceName, CommerceInstanceSettings settings) { InstanceName = instanceName; Settings = settings; }
public static string GetConnectionString(this ICommerceDbProvider dbProvider, CommerceInstanceSettings metadata) { if (String.IsNullOrEmpty(metadata.ConnectionString)) { return(dbProvider.ConnectionStringBuilder.BuildConnectionString(metadata.ConnectionStringParameters)); } return(metadata.ConnectionString); }