示例#1
0
//        [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);
        }
示例#2
0
//        [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);
        }