@yoajdin
Deleting an entity with a many-to-many relationship throws an ArgumentNullException
Is this an issue with pasting? You're missing a ");" at the end below. Not sure if it will resolve your issue it's just the first thing that stepped out to me
modelBuilder.Entity<Memory>(entity =>
{
entity.HasKey(m => m.Id); // Primary key
entity.Property(m => m.Title).IsRequired().HasMaxLength(200);
entity.Property(m => m.Description).HasMaxLength(2000);
entity.Property(m => m.Date).HasColumnType("datetime");
// Relationship with MemoryPerson
entity.HasMany(m => m.MemoryPeople)
.WithOne(mp => mp.Memory)
.HasForeignKey(mp => mp.MemoryId)
.OnDelete(DeleteBehavior.Cascade);
}
46 replies
Hosting an API
I'd like to add you don't need to dockerize. IE it's not mandatory. I've deployed API's to Azure with success without having to use Docker. I would look more so at pricing.
Hosting .NET can get expensive if you plan to host it 24/7. Check out pricing and see what your options are.
43 replies