Hi I have tables
Movie - ID, Name, Description, DirectorID-Fk, MusicID-Fk
Director - ID, Name
Music - ID, MusicName
Now I am trying to insert a new record to movie but I dont know whether Director is already existing in the DB and same with the Music).
From UI i am taking all movie information, DirectorName and MusicName
.
Now when i am saving information i have to check whether with directorname
and musicname
first and then how to do SaveChanges()
to context.
Let me know how this work.