Esempio n. 1
0
    GetAllEmployeesRequest GetRequestInfo()
    {
        // Get the Json from the POST.
        string      strJson = String.Empty;
        HttpContext context = HttpContext.Current;

        context.Request.InputStream.Position = 0;
        using (StreamReader inputStream = new StreamReader(context.Request.InputStream))
        {
            strJson = inputStream.ReadToEnd();
        }

        // Deserialize the Json.
        GetAllEmployeesRequest req = JsonConvert.DeserializeObject <GetAllEmployeesRequest>(strJson);

        return(req);
    }
 public Task <IActionResult> GetAllEmployes([FromQuery] GetAllEmployeesRequest request)
 {
     return(this.HandleRequest <GetAllEmployeesRequest, GetAllEmployeesResponse>(request));
 }