Infört Observable Property överallt, där tillämpligt
This commit is contained in:
@ -3,65 +3,30 @@ using SQLite;
|
||||
|
||||
namespace GreadyPoang.EntityLayer;
|
||||
[Table("Participants")]
|
||||
public class Participant : ObservableObject
|
||||
public partial class Participant : ObservableObject
|
||||
{
|
||||
public Participant()
|
||||
{
|
||||
_firstName = string.Empty;
|
||||
_lastName = string.Empty;
|
||||
_email = string.Empty;
|
||||
FirstName = string.Empty;
|
||||
LastName = string.Empty;
|
||||
Email = string.Empty;
|
||||
}
|
||||
|
||||
private int _participantId;
|
||||
private string _firstName;
|
||||
private string _lastName;
|
||||
private string _email;
|
||||
[ObservableProperty]
|
||||
[property: PrimaryKey, AutoIncrement, Column("ParticipantId")]
|
||||
private int participantId;
|
||||
|
||||
[PrimaryKey]
|
||||
[AutoIncrement]
|
||||
[Column("ParticipantId")]
|
||||
public int ParticipantId
|
||||
{
|
||||
get { return _participantId; }
|
||||
set
|
||||
{
|
||||
_participantId = value;
|
||||
OnPropertyChanged(nameof(ParticipantId));
|
||||
}
|
||||
}
|
||||
[ObservableProperty]
|
||||
[property: Column("FirstName")]
|
||||
private string firstName;
|
||||
|
||||
[Column("FirstName")]
|
||||
public string FirstName
|
||||
{
|
||||
get { return _firstName; }
|
||||
set
|
||||
{
|
||||
_firstName = value;
|
||||
OnPropertyChanged(nameof(FirstName));
|
||||
}
|
||||
}
|
||||
[ObservableProperty]
|
||||
[property: Column("LastName")]
|
||||
private string lastName;
|
||||
|
||||
[Column("LastName")]
|
||||
public string LastName
|
||||
{
|
||||
get { return _lastName; }
|
||||
set
|
||||
{
|
||||
_lastName = value;
|
||||
OnPropertyChanged(nameof(LastName));
|
||||
}
|
||||
}
|
||||
|
||||
[Column("Email")]
|
||||
public string Email
|
||||
{
|
||||
get { return _email; }
|
||||
set
|
||||
{
|
||||
_email = value;
|
||||
OnPropertyChanged(nameof(Email));
|
||||
}
|
||||
}
|
||||
[ObservableProperty]
|
||||
[property: Column("Email")]
|
||||
private string email;
|
||||
|
||||
public string FullName
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user