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