Example #1
0
        public IActionResult Find([FromServices] ChatRoomDbContext ctx)
        {
            var users = ctx.Users
                        .Where(x => x.Id != User.GetUserId())
                        .ToList();

            return(View(users));
        }
 public ChatRepository(ChatRoomDbContext ctx) => _ctx = ctx;
Example #3
0
 public RoomViewComponent(ChatRoomDbContext ctx) => _ctx = ctx;
Example #4
0
 public ChatRepository(ChatRoomDbContext context)
 {
     _context = context;
 }
Example #5
0
 public HomeController(IChatRepository repo, ChatRoomDbContext ctx)
 {
     _repo = repo;
     _ctx  = ctx;
 }