hello everyone have a good day i am making a website but i looked on the internet but i can't fix it in any way
entity : [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } public string BlogKategoriBaslik { get; set; } public int DurumId { get; set; } public Durum Durum { get; set; } code: public void BlogKategoriEkle(BlogKategori entity, bool tracking = false) { entity.BlogKategoriBaslik = entity.BlogKategoriBaslik; entity.DurumId = entity.DurumId; _Context.Add(entity); _Context.SaveChanges(); } error : SqlException: Cannot insert explicit value for identity column in table 'BlogKategoris' when IDENTITY_INSERT is set to OFF. DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)