public FollowingController(FollowingContext context) { _context = context; if (_context.Follows.Count() == 0) { _context.Follows.Add(new Following { FollowingID = 69420 }); _context.SaveChanges(); } }
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)); }