title: Owned types problem in Entity Framework Core 3.0
body: <p>I have strange behavior of EF Core 3.0 preview4. 
  I have main class:</p>
  
  <pre><code>public enum ClientType
  {
      Customer = 0,
      Produces = 1,
  }
  
  public class User : IdentityUser&lt;Guid&gt;
  {
      public ClientType ClientType { get; set; }
      public SMSCodeInfo SMSCodeInfo { get; set; }
      public string Discriminator { get; set; }
  }
  </code></pre>
  
  <p>In this code SMSCodeInfo is a class:</p>
  
  <pre><code>public class SMSCodeInfo
  { 
      public long Code { get; set; }
      public DateTime Expiration { get; set; }
  
      public SMSCodeInfo() { }
      public SMSCodeInfo(int days, int hours, int minutes) : this(DateTime.Now.AddDays(days).AddHours(hours).AddMinutes(minutes)) { }
      public SMSCodeInfo(DateTime Expiration)
      {
          this.Expiration = Expiration;
          Code = new Random().Next(100000, 999999);
      }        
  }
  </code></pre>
  
  <p>I tried to add <code>SMSCodeInfo</code> as owned data into the <code>User</code> class by different methods: <code>[Owned]</code> attribute usage,  adding code in <code>OnModelCreating(ModelBuilder modelBuilder)</code> method:</p>
  
  <pre><code>modelBuilder.Entity&lt;User&gt;().OwnsOne(o =&gt; o.SMSCodeInfo);
  </code></pre>
  
  <p>But each time I make a migration, I get 2 tables: <code>AspNetUsers</code> with an Identity information about users (I use Asp.net core identity in my project), and <code>AspNetUsers1</code> table which consists of <code>SMSCodeInfo</code> members. EF Core generates this code for migration and I can't understand "why"!</p>
  
  <pre><code>        migrationBuilder.CreateTable(
              name: "AspNetUsers1",
              columns: table =&gt; new
              {
                  UserId = table.Column&lt;Guid&gt;(nullable: false),
                  Code = table.Column&lt;long&gt;(nullable: false),
                  Expiration = table.Column&lt;DateTime&gt;(nullable: false)
              },
              constraints: table =&gt;
              {
                  table.PrimaryKey("PK_AspNetUsers1", x =&gt; x.UserId);
                  table.ForeignKey(
                      name: "FK_AspNetUsers1_AspNetUsers_UserId",
                      column: x =&gt; x.UserId,
                      principalTable: "AspNetUsers",
                      principalColumn: "Id",
                      onDelete: ReferentialAction.Cascade);
              });
  </code></pre>
  
  <p>"Additional". I want to have owned data be added in the AspNetUser table, not in a separate table. </p>
  
  <p>P.S. This problem arises for the classes, derived from IdentityUser&lt;>. For other classes in my project code like this <code>modelBuilder.Entity&lt;TOwner&gt;().OwnsOne(o =&gt; o.ToBeOwned);</code> works correct and gives correct tables with injected owned types.</p>