diff --git a/FileRepository/IFileRepository.cs b/FileRepository/IFileRepository.cs index 9764eef..4d0f764 100644 --- a/FileRepository/IFileRepository.cs +++ b/FileRepository/IFileRepository.cs @@ -14,28 +14,28 @@ namespace FileRepository /// Create a file in the repository. /// /// The file to store. - /// Returns a string id of the created file. + /// Returns a string fileName of the created file. Task CreateFileAsync(RepoFile file); /// /// Read a file from the repository. /// - /// The id of the file to read. + /// The file name of the file to read. /// Returns the file from the repository. - Task ReadFileAsync(string id); + Task ReadFileAsync(string fileName); /// /// Update a file in the repository. /// - /// The id of the file to update. + /// The file name of the file to update. /// Returns a boolean representing whether or not the update was successful. - Task UpdateFileAsync(string id); + Task UpdateFileAsync(string fileName); /// /// Delete a file in the repository. /// - /// The id of the file to delete. + /// The file name of the file to delete. /// Returns a boolean representing whether or not the delete was successful. - Task DeleteFileAsync(string id); + Task DeleteFileAsync(string fileName); } } diff --git a/FileRepository/Models/RepoFile.cs b/FileRepository/Models/RepoFile.cs index fae6c67..e54a22b 100644 --- a/FileRepository/Models/RepoFile.cs +++ b/FileRepository/Models/RepoFile.cs @@ -9,12 +9,7 @@ namespace FileRepository.Models public class RepoFile { /// - /// Gets or sets the id field for the file, this serves as the key field/unique identifier. - /// - public string Id { get; set; } - - /// - /// Gets or sets the actual file name of the file. + /// Gets or sets the actual file name of the file, this serves as the key field/unique identifier. /// public string FileName { get; set; } @@ -31,15 +26,13 @@ namespace FileRepository.Models /// /// Initialise a File model based on passed parameters. /// - /// The id of the file. /// The filename of the file. /// The content of the file. /// Returns an initialised File object. - public RepoFile GenerateFile(string id, string fileName, Stream content) + public RepoFile GenerateFile(string fileName, Stream content) { RepoFile newFile = new RepoFile() { - Id = id, FileName = fileName, Content = content, Created = DateTime.Now,