Пример #1
0
 public void Initiate(Identity.User.State user)
 {
     Apply <Events.Initiated>(x =>
     {
         x.BasketId = Id;
         x.UserName = user?.Id;
     });
 }
Пример #2
0
        public void Claim(Identity.User.State user)
        {
            Rule("Claimed", x => !string.IsNullOrEmpty(State.UserName), "Basket already claimed");

            Apply <Events.BasketClaimed>(x =>
            {
                x.BasketId = Id;
                x.UserName = user.Id;
            });
        }