title: Entity Framework 7 Database First configuration (MVC 6)
body: <p>After a long constant struggle, finally figured out how to use EF7 Database first approach using MVC 6. This is how it goes: </p>
  
  <p>App.Impl -> project.json:</p>
  
  <pre><code>"frameworks": {
      "net451": { },
      "dnx451": { }
  },
  "dependencies": {
      "EntityFramework.Commands": "7.0.0-rc1-final",
      "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
      "EntityFramework.MicrosoftSqlServer.Design": "7.0.0-rc1-final"
  },
  </code></pre>
  
  <p>Then running the command from cmd:</p>
  
  <pre><code>dnx ef dbcontext scaffold "Server=ip,port;Database=db;User Id=user;Password=pass;" EntityFramework.MicrosoftSqlServer
  </code></pre>
  
  <p>3 problems I am facing with this. On my Impl project. </p>
  
  <ol>
  <li><p>I have a folder dedicated to Data. My Data folder should contain all Database related things such as DbContext, DbClasses. However, Scaffold creates these files at the root. How can I specify the folder I want these files created?</p></li>
  <li><p>At my work place, I could have a database with 50 tables. However, what if I only need access to 2? I don't want to add all 50 tables for my project. How can I specify which tables I want?</p></li>
  <li><p>On my Database, I could have a table named "Users" because it is a table that contain users. However, scaffold should be creating a class as "User", since it is a single user until it becomes List. How can I specify the name of the table being created?</p></li>
  </ol>
  
  <p>Thank you all for the help.</p>