title: Entity Framework Core 2.2.3 not creating table using code-first approach vs 2017
body: <p>HI I am trying to learn EntityFramework Core from following tutorials <a href="http://www.entityframeworktutorial.net/code-first/what-is-code-first.aspx" rel="nofollow noreferrer">http://www.entityframeworktutorial.net/code-first/what-is-code-first.aspx</a></p>
  
  <p>So far i have created </p>
  
  <ul>
  <li>Domain Class</li>
  <li>DbContextImpl Class</li>
  <li>Execution class</li>
  </ul>
  
  <p>For some reason, i am unable to generate database table using code first approach.
   Framework:</p>
  
  <ul>
  <li>.Net Core 2.2</li>
  <li>EF Core 2.2.3[Edited]</li>
  <li>SQL Server v17.9.1</li>
  </ul>
  
  <p>My code is as follows:</p>
  
  <pre><code>using Microsoft.EntityFrameworkCore;
  
  namespace EntityFrameworkTuts.repo
  {
      public class TwitterDbContext: DbContext
      {
          public DbSet&lt;User&gt; Users { get; set; }
  
          public DbSet&lt;Tweet&gt; Tweet { get; set; }
  
          public TwitterDbContext() : base()
          {
          }
  
          protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
          {
              optionsBuilder.UseSqlServer(@"Data Source=sys-win;Initial Catalog=milton;Persist Security Info=True;User ID=sa;Password=password");
          }
  
  
      }
  }
  
  namespace EntityFrameworkTuts
  {
      public class User
      {
          public long Id { get; set; }
          public string Name { get; set; }
          public ICollection&lt;Tweet&gt; Tweets { get; set; }
      }
  }
  
  namespace EntityFrameworkTuts
  {
      class Program
      {
          static void Main(string[] args)
          {
              Console.WriteLine("Hello World!");
              using (var context = new TwitterDbContext())
              {
                  User user = new User
                  {
                      Name = "John Doe",
                  };
  
                  context.Users.Add(user);
                  var result = context.SaveChanges();
                  Console.WriteLine($"save user ${user.Name} with id ${result}");
              }
          }
      }
  }
  </code></pre>
  
  <p>I am getting exception below:</p>
  
  <pre><code>Unhandled Exception: Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---&gt; System.Data.SqlClient.SqlException: Invalid object name 'Users'.
     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
     at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)
     at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
     at System.Data.SqlClient.SqlDataReader.get_MetaData()
     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
     at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, SqlDataReader ds)
     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
     at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
     at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
  </code></pre>
  
  <p>I done small research and it looks like framework is not able to find Users tables.</p>
  
  <p>Should EFCore 2.2.3 automatically create one? Please let me know what silly mistake i might be doing.</p>
  
  <p>EDITED: Thanks Marc for clearing versioning doubt.</p>