public FollowingController(FollowingContext context)
 {
     _context = context;
     if (_context.Follows.Count() == 0)
     {
         _context.Follows.Add(new Following {
             FollowingID = 69420
         });
         _context.SaveChanges();
     }
 }
Example #2
0
 public bool SaveChanges()
 {
     return(followingContext.SaveChanges() > 0);
 }
 public IActionResult Create(Following newFollower)
 {
     _context.Follows.Add(newFollower);
     _context.SaveChanges();
     return(CreatedAtRoute("GetFollowers", new { id = newFollower.FollowingID }, newFollower));
 }