i try to create sqlite db using EF7. the class:
public class Item
{
//primaery key, not identity
public string id { get; set; }
//not primery key, but needed autoincerment
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int numberInc { get; set; }
}
but in the table genereted numberInc
its a normal column:
CREATE TABLE "VideoItem" (
"id" TEXT NOT NULL CONSTRAINT "PK_VideoItem" PRIMARY KEY,
"numberInc" INTEGER NOT NULL,
)
i also tried setting the column in OnModelCreating
:
modelBuilder.Entity<VideoItem>().Property(x => x.numberInc).UseSqlServerIdentityColumn();
but any effect.
iwm use EntityFramework.Sqlite 7.0.0-rc1-final
.