title: Connecting Web API to SQL Server
body: <p>I am new to ASP.NET and I am creating a Web API using sort of code first. I have model class call gender and defined as follow</p>
  
  <pre><code>public class Gender
  {
      public int Id { get; set; }
      public string Description { get; set; }
  }
  </code></pre>
  
  <p>I decided to create a new folder call <code>DBContext</code> and inside will defined all my <code>DBContext</code>, so for the gender class I have created <code>GenderDb</code> and look like follow:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Data.Entity;
  
  namespace BackAPI.Models
  {
      public class GenderDB : DbContext
      {
         // not define yet
      }
  }
  </code></pre>
  
  <p>However I am having an issue however with <code>DbContext</code> not being defined, apparently I am supposed to use Entity Framework, however I want to create my database not through Visual Studio, but using SQL Server 2014 Express. </p>
  
  <p>I did add my data connection and can see that I created a table in SQL Server, however how do I fix <code>DbContext</code>, if I use EF wouldn't that just create it locally and that not what I want</p>