public void Execute(CreateStudentMessage message) { var username = _claimsHelper.GetClaims().UserClaims.Username; if (username == "ofebres-cordero") { var replyMessage = new CreateStudentReplyMessage(message.CorrelationId); message.Student.Id = _repository.List().Select(_ => _.Id).Max() + 1; _repository.CreateStudent(message.Student); Context.Reply(replyMessage); } else { Console.WriteLine("Request Failed - Invalid Token"); Context.Reply(new CreateStudentReplyMessage(message.CorrelationId)); } }