9.0: NoteEdit Model
NoteEdit
Model
NoteEdit
ModelIn this section, we code the model that will allow us to update a note.
In the Solution Explorer, right click on ElevenNote.Models
Select Add -> Class and name it
NoteEdit.cs
Make the class public
Add the following properties.
UpdateNote
Method
UpdateNote
MethodOpen
NoteService.cs
Create a new method called
UpdateNote
that returns a bool based on if theNoteId
is in the database and the note belongs to the specific_userId
:Finish out the method:
Edit
Method
Edit
MethodOpen
NoteController.cs
Create an
Edit()
method under theDetails(int id)
method but above theNoteService
method:
Last updated