This PR refactors the data manipulation portion of the Program.cs file into its own service class, NoteService, in the Services folder. The NoteService class implements the INoteService interface, which provides methods for adding notes and printing all notes. The refactoring improves code modularity and reusability.
Summary of Changes
Created a new folder named Services and added the NoteService.cs and INoteService.cs files.
Moved the data manipulation code from the Program.cs file to the NoteService class.
Refactored the Program.cs file to use dependency injection to get an instance of the INoteService interface.
Updated the note-taker.csproj file to include the new Services folder and its files.
Fixes #21.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/refactor-data-manipulation
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.
Description
This PR refactors the data manipulation portion of the Program.cs file into its own service class,
NoteService
, in theServices
folder. TheNoteService
class implements theINoteService
interface, which provides methods for adding notes and printing all notes. The refactoring improves code modularity and reusability.Summary of Changes
Services
and added theNoteService.cs
andINoteService.cs
files.NoteService
class.INoteService
interface.Services
folder and its files.Fixes #21.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.