Beispiel #1
0
        public string SaveFile(string fileData, string fileExtention, string directory)
        {
            var id = idProvider.GetId(directory, fileExtention);

            fileWriter.SaveFile(directory + id + fileExtention, fileData);

            return(id);
        }
Beispiel #2
0
        public void SaveData(List <Rebel> collection)
        {
            if (collection == null)
            {
                throw new ServiceException("Null collection");
            }

            try
            {
                _fileWriter.SaveFile(collection);
            }
            catch (Exception ex)
            {
                throw new RepositoryException("Error al guardar", ex);
            }
        }