I get this error when insert a new album:
{System.Data.SqlClient.SqlException:
INSERT statement conflicted with COLUMN FOREIGN KEY
constraint 'FK_ChannelAlbum_Group'.
The conflict occurred in database 'Stamper', table 'Channel', column 'ID'.
I don't know what is going on because sometime I insert the new album to the context the error will occur but Album
table has no Channel ID
columns only Album_Channel
table. This insert does not influence the album_channel
and channel
table at all. Why is there a conflict.
I realized that after I have created the new album after that i try inserting a album_channel data I have an error so I stop debugger and try to fix the problem. Once i have work that out, I go an insert a new album once more but it gives me this error always. So I close my visual studio and reopen it in order to work.....
I am not sure is it a good way of having singleton style of creating the context e.g.
I have write a context as class and this context only created once, to prevent it to create too many times.