Exemple #1
0
        public void DeleteForeighKeyOnMembershipIDFact()
        {
            var connection  = default(DbConnection);
            var transaction = default(DbTransaction);

            try
            {
                connection = this._factory.CreateConnection();
                connection.Open();

                transaction = connection.BeginTransaction();

                // Memberships
                var membership = new MembershipEntity()
                {
                    Name = new Random().Next().ToString(CultureInfo.InvariantCulture), Password = @"password",
                };
                var memberships = new MembershipsRepository();
                membership.CreatedOn = KandaRepository.GetUtcDateTime(connection, transaction);
                var status = MembershipCreateStatus.ProviderError;
                if (!memberships.Create(membership, connection, transaction, out status))
                {
                    Assert.True(!true);
                }

                // Users
                var user = new UserEntity() /*ID = @"",*/ FamilyName
                {
                        = @"family name", GivenName = @"given name", AdditionalName = @"additional name", Description = @"description", CreatedOn = membership.CreatedOn, Enabled = true,
                };
Exemple #2
0
 public UnitOfWork(DataContext context)
 {
     _context      = context;
     Users         = new UsersRepository(_context);
     Photos        = new PhotosRepository(_context);
     Groups        = new GroupsRepository(_context);
     Memberships   = new MembershipsRepository(_context);
     Auths         = new AuthRepository(_context);
     Comments      = new CommentsRepository(_context);
     Achievements  = new AchievementsRepository(_context);
     Cities        = new CitiesRepository(_context);
     Countries     = new CountriesRepository(_context);
     Locations     = new LocationsRepository(_context);
     Matchdays     = new MatchdaysRepository(_context);
     MatchStatuses = new MatchStatusesRepository(_context);
     Friends       = new FriendsRepository(_context);
     Messages      = new MessagesRepository(_context);
     Chats         = new ChatsRepository(_context);
 }