Exemplo n.º 1
0
 public void Handle(ActivatedUserEvent @event)
 {
     using (var db = new DisciturContext())
     {
         UserActivation activation = db.UserActivations.Where(a => a.UserName.Equals(@event.UserName) && a.Key.Equals(@event.Id.ToString())).First();
         if (activation != null)
         {
             db.UserActivations.Remove(activation);
             db.SaveChanges();
         }
     }
 }
Exemplo n.º 2
0
 void Apply(ActivatedUserEvent @event)
 {
     IsActivated = true;
 }