Exemplo n.º 1
0
        public void Execute(DeleteStudentMessage message)
        {
            var username = _claimsHelper.GetClaims().UserClaims.Username;

            if (username == "ofebres-cordero")
            {
                _repository.DeleteStudent(message.Id);
                var replyMessage = new DeleteStudentReplyMessage(message.CorrelationId);
                Context.Reply(replyMessage);
            }
            else
            {
                Console.WriteLine("Request Failed - Invalid Token");
                Context.Reply(new DeleteStudentReplyMessage(message.CorrelationId));
            }
        }