title: Unable to get posted data with Angular from asp.net
body: <p>I'm sending a post request to my asp.net server from angular and i tried printing the values of my custom model class (<strong>SchoolModel</strong>) and it's all the values corrent inside angular. But when i try to get these values on asp.net it doesn't return anything from inside the object. Please help me if i'm missing something.</p>
  <p><strong>My angular code request</strong></p>
  <pre><code>const headers = {'Content-Type': 'application/json', };
              const body = { schoolData };
              this.http.post&lt;any&gt;(this.baseUrl + &quot;Api/CreateSchool&quot;, body, { headers }).subscribe(response =&gt; {
              
                  console.log(response);
                  
      
              }, error =&gt; console.error(error));
  </code></pre>
  <p><strong>My ASP.NET code:</strong></p>
  <pre><code>    [HttpPost]
      [Route(&quot;Api/CreateSchool&quot;)]
      public bool CreateNewSchool(SchoolModel schoolData)
      {
          bool schoolCreated = false;
          // IT PRINTS SCHOOL NAME ONLY 
          Console.WriteLine(&quot;SCHOOL NAME &quot; + schoolData.Name);
          return schoolCreated;
      }
  </code></pre>