TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
nave
NA
9.5k
0
How to update foreign key back to NULL?
Oct 21 2013 5:54 AM
How do i update a foreign key column back to null?
On insert or update i use this:
getCategory = _db.Categories.Find(id);
Events.Categories = getCategory; //add foreign key
But if the category is 0 (not selected) i want to update the relationship Category_ID back to null.
Try to do it like that:
Events.Categories = null; //add foreign key
But it doesn't seems to work
Please advise
Thanks
Reply
Answers (
2
)
project
GridView in Asp.net