Sunday, 13 March 2022

asp.net core entity issues

 > in my entity i have two ids so the entity unable find based on id
so i have commented or removed one id which is autogenerated . 

code below:

https://qawithexperts.com/article/c-sharp/using-entity-framework-join-ef-join-to-join-two-or-more-tabl/192


/ /entity.HasKey(e => new { e.AddressId, e.LinkId });

                entity.HasKey(e => new {  e.LinkId });

                entity.ToTable("Address", "Web");


                //entity.Property(e => e.AddressId)

                //    .ValueGeneratedOnAdd()

                //    .HasColumnName("AddressID");


                entity.Property(e => e.LinkId).HasColumnName("LinkID");

No comments:

Post a Comment

API run block issue run api from cmd

  ✅ Debug Checklist – “Access is Denied” (.NET / Visual Studio) 🔹 Identify Problem ☐ Error: Unable to start program (.exe) – Access is deni...