public void Initiate(Identity.User.State user) { Apply <Events.Initiated>(x => { x.BasketId = Id; x.UserName = user?.Id; }); }
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; }); }