title: Web API, C#, Json Objects, Views
body: <p>I have some issues with displaying data as a Json object in this ASP.NET Web API project. It is my first try, I don't have Views, I am gonna use Postman for testing. Can you give me some diretions how to display the model as an Json Object?  </p>
  
  <pre><code>//UserController
  
             public class UsersController : ApiController
                  {
                      private LearnToLearnContext db = new LearnToLearnContext();
                      private BaseRepository&lt;Users&gt; _repository = null;
  
                      public UsersController()
                      {
                          this._repository = new BaseRepository&lt;Users&gt;();
                      }
  
                      // GET: api/Users
                      [ResponseType(typeof(Users))]
                      public IHttpActionResult GetUsers()
                      {
                          var user = _repository.GetAll();
                          var bindingModel = Mapper.Map&lt;UsersBindingModels&gt;(user);
  
                          return Ok(bindingModel);
                      }
              }
  
  
  //UserModel
  
  public class Users
      {
          [Key]
          public int Id { get; set; }
          [Required]
          public string Name { get; set; }
          [Unique]
          [Required]
          public string Email { get; set; }
          [Required]
          public string Password { get; set; }
          public bool IsTeacher { get; set; }
  
          public virtual List&lt;Courses&gt; Courses { get; set; }
      } 
  
  //UserBindingModel
   public class UsersBindingModels
      {
          [Required]
          public string name { get; set; }
          [Unique]
          [Required]
          public string email { get; set; }
          [Required]
          public string password { get; set; }
          public bool isTeacher { get; set; }
  
          public virtual List&lt;Courses&gt; Courses { get; set; }
      }
  </code></pre>