// [ValidateAntiForgeryToken] public List <OutgoingChatItem> GetChatChannelsNavigation([FromBody] IncomingIdRequest request) { var result = new List <OutgoingChatItem>(); using (var context = new ChatContext(Context, Configuration)) { result = context.GetChatChannels(request.Id, UserId); } return(result); }
// [ValidateAntiForgeryToken] public List <OutgoingChatItem> AddNewChatRoom([FromBody] IncomingIdRequest request) { var result = new List <OutgoingChatItem>(); using (var context = new ChatContext(Context, Configuration)) { context.AddNewChatRoom(request); result = context.GetChatChannels(request.WorkItemType, UserId); } return(result); }