Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
Data not updated to database
Sivakumar
9y
418
1
Reply
Hi,
This is my code :
public 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=n.IsRead });
return nd;
}
}
When I execute the data will be displayed but not saving to database
Please give me correct code for that
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Cannot implicitly convert type 'System.Linq.IQueryable'
i want send lpr command to cmd in c#