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
Sivakumar
NA
551
218.3k
Updated changes not saving to database table
Oct 5 2015 12:42 AM
Hi,
This is my code :
public List<NotificationData> ReadNotification(int memberId, int NotificationId)
{
using (KiwiDbContext context=new KiwiDbContext(_ConnectionString))
{
NotificationData nd = new NotificationData();
nd.IsRead = true;
var query = (from n in context.Notifications where n.MemberID == memberId && n.NotificationID == NotificationId && n.IsRead == false select new NotificationData { NotificationID = n.NotificationID, Message = n.Message, CreatedTime = n.NotificationTime, IsRead = nd.IsRead });
return query.ToList();
context.SaveChanges();
}
This execution is done but the updated result is not saving to database table
Please give me a correct code for that.
Thank you.
Reply
Answers (
10
)
Preview table in datatable in a report reportviewer
disable pdf download button in c#