Esempio n. 1
0
        private void Load()
        {
            var path             = Path.Combine(_config.RootPath, Filename);
            var fileAlreadyExist = File.Exists(path);

            if (!fileAlreadyExist)
            {
                _entities = new List <TEntity>();
            }
            else
            {
                var serializer = new CsvSerializer();
                _entities = serializer.Deserialize <TEntity>(path).ToList();
            }
        }
Esempio n. 2
0
        private void Save()
        {
            var serializer = new CsvSerializer();

            serializer.Serialize(_entities, Filename);
        }