mirror of
https://github.com/jcreek/Creek.FileRepository.git
synced 2026-07-13 02:43:43 +00:00
refactor(*): Remove the id from RepoFile as the filename can be used instead as a UID
This commit is contained in:
@@ -9,12 +9,7 @@ namespace FileRepository.Models
|
||||
public class RepoFile
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the id field for the file, this serves as the key field/unique identifier.
|
||||
/// </summary>
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
|
||||
@@ -31,15 +26,13 @@ namespace FileRepository.Models
|
||||
/// <summary>
|
||||
/// Initialise a File model based on passed parameters.
|
||||
/// </summary>
|
||||
/// <param name="id">The id of the file.</param>
|
||||
/// <param name="fileName">The filename of the file.</param>
|
||||
/// <param name="content">The content of the file.</param>
|
||||
/// <returns>Returns an initialised File object.</returns>
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user