Hello,
namespace name 'Notes' could not be found
For this issue, please refer to Compiler Error CS0246 for more details.
For your question, I noticed that you commented using Notes.Models;
.
If you have already created the Note class in Notes.Models
, please uncomment it.
If you don't want to use Using Namespace
at the beginning, replace Note
in your code with Notes.Models.Note
.
According to the project you provided, you did not create the Note class in this project.
- Right-click to create a Note class file in the project and add the following code to the file.
using System;
using SQLite;
namespace Notes.Models
{
public class Note
{
[PrimaryKey, AutoIncrement]
public int ID { get; set; }
public string Text { get; set; }
public DateTime Date { get; set; }
}
}
- Reference namespaces in
NoteDatabase.cs
.
using Notes.Models;
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.