Created
August 19, 2019 21:00
-
-
Save Sa1Gur/25050fed01b7d32795254916152fee4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TeamMatesViewModel.cs | |
public readonly SQLiteConnection conn; | |
... | |
public TeamMatesViewModel() | |
{ | |
... | |
conn = new SQLiteConnection($@"{FileSystem.AppDataDirectory}/teammates.db3"); | |
TeamMateSquad = new ObservableCollection<TeamMateItem>(conn.Table<TeamMateItem>().ToList()); | |
} | |
TeamMateItem.cs | |
[Table("teammates")] | |
public class TeamMateItem : INotifyPropertyChanged | |
{ | |
[PrimaryKey, AutoIncrement] | |
public int Id { get; set; } | |
... | |
[MaxLength(250), Unique] | |
public string Name | |
... | |
[MaxLength(10)] | |
public uint Level |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment