Add project files.
This commit is contained in:
75
Gready_Poang.EntityLayer/EntityClasses/Participant.cs
Normal file
75
Gready_Poang.EntityLayer/EntityClasses/Participant.cs
Normal file
@ -0,0 +1,75 @@
|
||||
using Common.Library;
|
||||
using SQLite;
|
||||
|
||||
namespace GreadyPoang.EntityLayer;
|
||||
[Table("Participants")]
|
||||
public class Participant : EntityBase
|
||||
{
|
||||
public Participant()
|
||||
{
|
||||
_firstName = string.Empty;
|
||||
_lastName = string.Empty;
|
||||
_email = string.Empty;
|
||||
}
|
||||
|
||||
private int _participantId;
|
||||
private string _firstName;
|
||||
private string _lastName;
|
||||
private string _email;
|
||||
|
||||
[PrimaryKey]
|
||||
[AutoIncrement]
|
||||
[Column("ParticipantId")]
|
||||
public int ParticipantId
|
||||
{
|
||||
get { return _participantId; }
|
||||
set
|
||||
{
|
||||
_participantId = value;
|
||||
RaisePropertyChanged(nameof(ParticipantId));
|
||||
}
|
||||
}
|
||||
|
||||
[Column("FirstName")]
|
||||
public string FirstName
|
||||
{
|
||||
get { return _firstName; }
|
||||
set
|
||||
{
|
||||
_firstName = value;
|
||||
RaisePropertyChanged(nameof(FirstName));
|
||||
}
|
||||
}
|
||||
|
||||
[Column("LastName")]
|
||||
public string LastName
|
||||
{
|
||||
get { return _lastName; }
|
||||
set
|
||||
{
|
||||
_lastName = value;
|
||||
RaisePropertyChanged(nameof(LastName));
|
||||
}
|
||||
}
|
||||
|
||||
[Column("Email")]
|
||||
public string Email
|
||||
{
|
||||
get { return _email; }
|
||||
set
|
||||
{
|
||||
_email = value;
|
||||
RaisePropertyChanged(nameof(Email));
|
||||
}
|
||||
}
|
||||
|
||||
public string FullName
|
||||
{
|
||||
get { return $"{FirstName} {LastName}"; }
|
||||
}
|
||||
|
||||
public string LastNameFirstName
|
||||
{
|
||||
get { return $"{LastName}, {FirstName}"; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user