public void SeedingFollowlist()
        {
            var users = _databaseServices.GetUsers();

            Followlist f1 = new Followlist
            {
                FLOwnerID    = users[0].Id,
                followingIDs = new List <string> {
                    users[2].Id, users[3].Id, users[1].Id
                }
            };

            Followlist f2 = new Followlist
            {
                FLOwnerID    = users[2].Id,
                followingIDs = new List <string> {
                    users[1].Id, users[2].Id, users[4].Id
                }
            };

            Followlist f3 = new Followlist
            {
                FLOwnerID    = users[3].Id,
                followingIDs = new List <string> {
                    users[2].Id, users[1].Id, users[4].Id
                }
            };

            Followlist f4 = new Followlist
            {
                FLOwnerID    = users[4].Id,
                followingIDs = new List <string> {
                    users[0].Id, users[1].Id, users[2].Id
                }
            };

            Followlist f5 = new Followlist
            {
                FLOwnerID    = users[1].Id,
                followingIDs = new List <string> {
                    users[2].Id, users[3].Id, users[4].Id
                }
            };

            _databaseServices.CreateFollowlist(f1);
            _databaseServices.CreateFollowlist(f2);
            _databaseServices.CreateFollowlist(f3);
            _databaseServices.CreateFollowlist(f4);
            _databaseServices.CreateFollowlist(f5);
        }
Esempio n. 2
0
        public ActionResult <Users> Create(Followlist followlist)
        {
            _databaseServices.CreateFollowlist(followlist);

            return(CreatedAtRoute("GetUser", new { id = followlist.FLOwnerID.ToString() }, followlist));
        }