title: How can I "inject" the UserId into my model request?
body: <p>My Employee request:</p>
  <pre><code>namespace API.Requests {
     public class EmployeeRequest {
         public string Name { get; set; }
         ...
     }
  
     public static class Extensions {
        public static Employee ToEntity(this EmployeeRequest request) =&gt; new Employee {
          Name = request.Name,
          //UserId = ...
          ...
        };
  }
  </code></pre>
  <p>So in my controller I have:</p>
  <pre><code>[HttpPost]
  public async Task&lt;ActionResult&gt; Poststring( [FromForm] EmployeeRequest request )
  {
       var employee = request.ToEntity();
       return Ok(employee.UserId);
  }
  </code></pre>
  <p>So, what I need is that inside the ToEntity function modify the UserId field through the UserManager so that the entity that I get after executing the ToEntity function includes the UserId.</p>
  <p>Thank you! :D</p>