Beispiel #1
0
 public void AddFileAndSave(FileDTO file)
 {
     if (file.Id == null)
     {
         throw new Exception("Guid can't be null. Use hash for it.");
     }
     Repository.Add(FileMapper.ToFile(file));
     Repository.Save();
 }
Beispiel #2
0
 public FileDTO GetFile(Guid guid)
 {
     return(FileMapper.ToFileDTO(Repository.Get(guid)));
 }