public void RefreshFileDB() { var filesOnDisk = ReadFiles(); var filesInDB = GetMediaFiles(); mediaFilesRepository.Delete(f => true); //filesInDB.Except(filesOnDisk, ) foreach (MediaFile f in filesOnDisk) { mediaFilesRepository.Add(f); } unitOfWork.Commit(); }