title: Getting HttpReques does not contain definition for Form - Datatable server side processing
body: <p>I have the following server side code: </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Net;
  using AutoMapper;
  using myProject.Models;
  using System.Web.Http;
  using MyProject.Dtos;
  
  using System.Web.Mvc;
  using System.Linq.Dynamic;
  using System.Data.Entity;
  public class MembersController: Controller 
  {
       public MembersController()
          {
              _context = new ApplicationDbContext();
  
          }
  
  public ActionResult GetMembers(string query = null)
          {
              try
              {
                  //Creating instance of DatabaseContext class  
                  using (_context)
                  {
                      var draw = Request.Form.GetValues("draw").FirstOrDefault();
                      var start = Request.Form.GetValues("start").FirstOrDefault();
                      var length = Request.Form.GetValues("length").FirstOrDefault();
  
  
  
                      //Paging Size (10,20,50,100)    
                      int pageSize = length != null ? Convert.ToInt32(length) : 0;
                      int skip = start != null ? Convert.ToInt32(start) : 0;
                      int recordsTotal = 0;
  
                      // Getting all member data    
                      var membersQuery = _context.Members.ToList();
  
  
  
                      //total number of rows count     
                      recordsTotal = membersQuery.Count();
                      //Paging     
                      var data = membersQuery.Skip(skip).Take(pageSize).ToList();
                      ////Returning Json Data    
                      return Json(new { draw = draw, recordsFiltered = recordsTotal, recordsTotal = recordsTotal, data });
  
  
                  }
              }
              catch (Exception)
              {
                  throw;
              }
  
          }
  
  }
  </code></pre>
  
  <p>Here's my view: </p>
  
  <pre><code>var table = $("#members").DataTable({
          "processing": true, // for show progress bar  
          "serverSide": true,
          "pageLength":5,
  
          ajax: {
              url: "/api/members",
              dataSrc: "",
              "type": "POST",
              "datatype": "json" 
  
          },
  
          columns: [
              {
                  data: "cardNumber"
              },
              {
                  data: "registrationDate",
  
              },
              {
                  data: "fullName",
  
              },
              {
                  data: "address"
              },
              {
                  data: "phoneNumber"
              },
              {
                  data: "email"
              }             
          ]
      });
  </code></pre>
  
  <p>I am getting the following compile errors: </p>
  
  <blockquote>
    <p>Error   CS1061  'HttpRequestMessage' does not contain a definition for 'Form' and no accessible extension method 'Form' accepting a first argument of type 'HttpRequestMessage' could be found (are you missing a using directive or an assembly reference?)    </p>
    
    <p>Error CS0029  Cannot implicitly convert type 'System.Web.Http.Results.JsonResult&lt; data>>' to 'System.Web.Mvc.ActionResult'     </p>
  </blockquote>
  
  <p>I am following <a href="https://www.c-sharpcorner.com/article/using-datatables-grid-with-asp-net-mvc/" rel="nofollow noreferrer">this</a> tutorial for guidance. </p>
  
  <p>Will appreciate your help</p>