I keep getting this error when trying to delete a record from my table. Insert and Update work fine apart from delete.
Here is my set up:
Mappings:
HasMany(x => x.Items).AsList().AsBag().LazyLoad().Cascade.AllDeleteOrphan();
GetMethod:
IRepositoryWithTypedId<BOD.Entities.Item, Guid> Rep = RepositoryFinder.For<BOD.Entities.Item, Guid>();
BOD.Entities.Item tag = Rep.Get(new Guid("0A495241-082F-4314-8B79-000A524FC666"));
Rep.Delete(tag);
I have also tried using:
Repository().DbContext.CommitTransaction();
Repository().DbContext.CommitChanges();
These two still cause errors. Does anyone have any suggestions?