Exemple #1
0
        public AssociatedWorkItemMessages WorkItemAddMessage([FromBody] IncomingWorkItemMessage request)
        {
            var result      = default(AssociatedWorkItemMessages);
            var currentUser = this.User;
            var id          = int.Parse(currentUser.Claims.ElementAt(1).Value);

            using (var context = new DatabaseController(Context, Configuration))
            {
                result = context.AddNewWorkItemMessage(request, id);
                result.Message.AssociatedWorkItemMessages = null;
                result.Message.Sender = context.GetUserAccount(result.Message.SenderId);
            }
            return(result);
        }