Consider the following entity model:
public class Agreement : Entity { public int AgreementId { get; set; } public virtual ICollection
Ended up solving this by calling the following:
dbContext.Set<Agreement>().Remove(agreement);
I wanted to get rid of the Agreements property on the DbContext, which is why I was trying to do it with Entry(agreement).State = EntityState.Deleted.
Agreements
DbContext
Entry(agreement).State = EntityState.Deleted