Hello anyone and everyone,
Please can you help me to enable the deleting of books from my database?
I am using EF 4 and have a many-to-many relationship between books and authors. When I try to delete a book, I get the following:
he DELETE statement conflicted with the REFERENCE constraint "FK_BookAuthor_Book". The conflict occurred in database "C:\PROGRAM FILES\MICROSOFT SQL SERVER\MSSQL10.SQLEXPRESS\MSSQL\DATA\NTCODING.MDF", table "dbo.BookAuthor", column 'BookAuthor_Author_Id'. The statement has been terminated.
Being a SQL guru is not what I do, but I think it is telling me that there is a record in the join table that also needs to be deleted. I'm not sure which property I need to set or what bit of coding I need to add.
If you can help me with this I would be really appreciative.
Thanks in advance
Nick