public DbFactory(IConnectionFactory connectionFactory) { if (connectionFactory == null) { throw new ArgumentNullException("connectionFactory"); } var connectionString = connectionFactory.GetConnectionString(); _context = new SuperChefContext(connectionString); }