public NHibernateFileBackupBase( FileBoxTransformation <T> fileTransform, NHibernateBoxTransformation <T, TE> dbTransform) { _fileTransform = fileTransform; _dbTransform = dbTransform; GetEntitiesToBackup = new Func <IRepository <TE>, IList <TE> >(repo => repo.GetAll()); ImportStrategy = BoxImporterStrategy.SkipExisting; }
public HttpProxyFileBackup( FileBoxTransformation<HttpProxyBoxMap> fileTransform, NHibernateBoxTransformation<HttpProxyBoxMap, HttpProxyEntity> dbTransform) : base(fileTransform, dbTransform) { dbTransform.FindExistingEntity = (repo, e) => repo.FindOne(new Dictionary<string, object> { { "IP", e.IP } }); }