5.3: Change NoteCreate Model
Last updated
Last updated
In this module we'll override the ToString()
method in our models.
ToString()
overrideIn this section, we alter the ToString()
override with a fat arrow function, also known as a lambda expression. Lambda expressions allow you to write local functions that can be passed as arguments or returned by function calls. In this case, we use it with the ToString()
method to convert Title
to a string regardless of its data type.
Go back to the NoteCreate.cs
model
Change the ToString()
override to match this:
Do the same for the NoteListItem.cs
model