コード例 #1
0
 public FriendController(SharedActivityDbContext context)
 {
     //Links Db
     //If no relations add default to prevent null references
     if (context.UserToUser == null)
     {
         context.UserToUser.Add(new UserToUser()
         {
             UserId = "0", FriendId = "0"
         });
     }
     context.SaveChanges();
     _context = context;
 }
コード例 #2
0
 public ActivitiesController(SharedActivityDbContext context)
 {
     _context = context;
 }
コード例 #3
0
 public HomeController(SharedActivityDbContext context, IConfiguration configuration)
 {
     _context       = context;
     _configuration = configuration;
 }