@yoajdin
@yoajdin
CC#
Created by Gax on 12/22/2024 in #help
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
CC#
Created by Mihneas22 on 12/20/2024 in #help
Hosting an API
If you decide 5 years from now to containerize you can switch. IE it's not set in stone type of stuff. Docker is a good tool and skill to have though
43 replies
CC#
Created by Mihneas22 on 12/20/2024 in #help
Hosting an API
Damn that's a good bot. Agreed. Shit gets expensive fast
43 replies
CC#
Created by Mihneas22 on 12/20/2024 in #help
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