Exemple #1
0
        void InitializeUserWithLoyaltyCard(string emailAddress)
        {
            var configuration = new GlobalmanticsMappingConfiguration();
            var context       = new DataContext("GlobalmanticsContext", configuration);
            var user          = context.Add(User.Create(emailAddress));

            context.Commit();
            context.Add(LoyaltyCard.Create(user, "35196429541"));
            context.Commit();
        }
Exemple #2
0
        public void GivenLoyaltyCard()
        {
            var loyaltyCard = Context.Add(LoyaltyCard.Create
                                          (
                                              user: User,
                                              cardNumber: "35196429541"
                                          ));

            User.LoyaltyCards.Add(loyaltyCard);
        }