Beispiel #1
0
        /// <summary>
        /// Fill the in memory database with our mock data.
        /// </summary>
        private void PopulateDatabaseWithMockData()
        {
            Roles.Add(MockRoles.Admin);
            Roles.Add(MockRoles.User);
            var allUsers = MockApplicationUsers.GetAll().ToArray();

            Users.AddRange(allUsers);
            SaveChanges();
            foreach (var user in allUsers)
            {
                UserRoles.Add(MockUserRoles.GetUserRoleForUser(user.Id));
            }
            Todo.AddRange(MockTodos.GetAll());
            SaveChanges();
        }