GreenQloud.Persistence.SQLite.SQLiteRepositoryIgnoreDAO.Create C# (CSharp) Метод

Create() публичный Метод

public Create ( LocalRepository repo, string path ) : void
repo LocalRepository
path string
Результат void
        public override void Create(LocalRepository repo, string path)
        {
            if (!All(repo).Exists(ri => ri.Path.Equals(path)))
            {
                database.ExecuteNonQuery(string.Format("INSERT INTO RepositoryIgnore (RepositoryId, Path) VALUES ('{0}', '{1}')", repo.Id, path));
            }
        }

Usage Example

 private void CreateIgnoredList(List<string> ignoreKeys, LocalRepository repo)
 {
     SQLiteRepositoryIgnoreDAO repoIgnoreDao = new SQLiteRepositoryIgnoreDAO();
     foreach (string ignore in ignoreKeys)
     {
         repoIgnoreDao.Create(repo, ignore);
     }
 }
SQLiteRepositoryIgnoreDAO