diff --git a/Models/ContentModel.cs b/Models/ContentModel.cs index 26f2e64..e91d81f 100644 --- a/Models/ContentModel.cs +++ b/Models/ContentModel.cs @@ -2,6 +2,6 @@ namespace BinaryDad.Notes.Models; public class ContentModel { - public ICollection NoteNames { get; set; } - public string Text { get; set; } + public ICollection NoteNames { get; set; } = new List(); + public string Text { get; set; } = string.Empty; } \ No newline at end of file diff --git a/Services/FileNoteService.cs b/Services/FileNoteService.cs index 93c7297..9decc84 100644 --- a/Services/FileNoteService.cs +++ b/Services/FileNoteService.cs @@ -2,8 +2,8 @@ { public class FileNoteService : INoteService { - private readonly string? defaultFileName; - private readonly string? filePath; + private readonly string defaultFileName; + private readonly string filePath; public FileNoteService(IConfiguration configuration) { @@ -39,7 +39,7 @@ File.Delete(filePath); } - private void CheckFile(string noteName) + private void CheckFile(string? noteName) { var filePath = GetFilePath(noteName);