I don\'t know if it\'s an Entity Framework\'s desing choice or a wrong approach on my behalf, but whenever I try to AddRange entities to a DbSet I can\'t seem to get the aut
Please try this, it works for Int type column, need to try on long types.
[Table("entities")]
public class Entity
{
[Key]
[Column("id")]
// this you need to tell to Ef to use Identity .
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Column("field")]
public string Field { get; set; }
}