public async Task <ActionResult> Post(CreateStudentRequest studentRequest)
 {
     return
         ((await _operationInvoker.InvokeAsync(
               new CreateStudentCommand(
                   new Student
     {
         PublicKey = Guid.NewGuid(),
         DateOfBirth = studentRequest.DateOfBirth,
         Firstname = studentRequest.Firstname,
         Surname = studentRequest.Surname
     }))).ToActionResult());
 }
        public ValueTask <(object returnValue, object[] outputs)> InvokeAsync(object instance, object[] inputs)
        {
            OperationContext.Current.ThrowIfNull().ReplacePrimaryIdentity(
                _handler.Authenticate(
                    WebOperationContext.Current.ThrowIfNull().IncomingRequest,
                    WebOperationContext.Current.ThrowIfNull().OutgoingResponse,
                    inputs,
                    _validatorType,
                    OperationContext.Current.ThrowIfNull().HasTransportLayerSecurity(),
                    _requiresTransportLayerSecurity,
                    _source));

            return(_invoker.InvokeAsync(instance, inputs));
        }
Ejemplo n.º 3
0
 public ValueTask <(object returnValue, object[] outputs)> InvokeAsync(object instance, object[] inputs)
 {
     InvokeCount++;
     return(_innerInvoker.InvokeAsync(instance, inputs));
 }