public BasePinata(string connectionString, Provider.Type provider) { Provider = provider; Command = CommandFactory.Create(provider); Repository = RepositoryFactory.Create(connectionString, provider); DynamicParameters = new Dictionary<string, string>(); }
public static IPinataRepository Create(string connectionString, Provider.Type type) { IPinataRepository repository = null; switch (type) { case Provider.Type.MySQL: { repository = new MySQL.PinataRepository(connectionString, Provider.MySQL); break; } case Provider.Type.MongoDB: { repository = new MongoDB.PinataRepository(new MongoUrl(connectionString)); break; } } return repository; }
public static ICommand Create(Provider.Type provider) { ICommand command = null; switch (provider) { case Provider.Type.MySQL: { command = new CommandSQL(); break; } case Provider.Type.MongoDB: { MongoCustomSerializer(); command = new CommandMongo(); break; } } return command; }
public Pinata(string connectionString, Provider.Type provider, params string[] samplePath) : base(connectionString, provider, samplePath) { }
public Pinata(string connectionString, Provider.Type provider) : base(connectionString, provider) { }