public HomeController(OnlineChatDBContext context, IHomeService service, IHubContext <HomeHub> chat, IChatService chatService) // { _context = context; _homeService = service; _chat = chat; _chatService = chatService; }
public ChatService(OnlineChatDBContext context, IHttpContextAccessor httpContextAccessor, IMapper mapper, IHomeService homeService) { _context = context; _httpContextAccessor = httpContextAccessor; _mapper = mapper; _homeService = homeService; }
public async Task <IActionResult> SendMessageAsync(int groupId, string message, string groupName, string connectionId, [FromServices] OnlineChatDBContext context) { var messageView = await _chatService.ReturnSendedMessageAsync(groupId, message); await _chat.Clients.Group(groupName) .SendAsync("ReceiveMessage", messageView, connectionId, groupId); await NotificateUsers(groupId, connectionId, messageView); return(Ok()); }
public HomeService(OnlineChatDBContext context, IHttpContextAccessor httpContextAccessor, IMapper mapper) { _context = context; _httpContextAccessor = httpContextAccessor; _mapper = mapper; }
public ChatHub(OnlineChatDBContext context) { _context = context; }
public HomeHub(OnlineChatDBContext context) { _context = context; }
public ChatViewComponent(OnlineChatDBContext context) { _context = context; }