I have an user class in asp.net web form application:
public int ID { get; set; }
public string UserName { get; set; }
public byte[] Password { get; set; }
public string Mail { get; set; }
public string AvatarURL { get; set; }
public Status Status { get; set; } = Status.NotConfirmed;
public Guid ConfirmationGuid { get; set; }
public DateTime RegistrationDate { get; set; } = DateTime.Today;
Status property is an enum:
public enum Status : byte {
NotConfirmed,
Active,
Blocked,
Deactivated
}
when the user signs up, its status is NotConfirmed, new Guid for this user is generated and activation link is sent to email. I`d like to remove user record from database if he/she not confirms email in 1 hour. Can you please give me a hint, how to do that?