Issue
Here is what I have:
public class Note
{
[PrimaryKey, NotNull]
public int NotesId { get; set; }
public string Text { get; set; }
}
I am using this statement to create the table:
db2.CreateTable<Note>();
Is there a way the table can be named "Notes" instead of "Note"
Solution
Sqlite-Net uses the class name to create the table . As a workaround , you could create a subclass of Note
public class Note
{
[PrimaryKey, NotNull]
public int NotesId { get; set; }
public string Text { get; set; }
}
public class Notes :Note
{
}
db2.CreateTable<Notes>();
Answered By - Lucas Zhang - MSFT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.