Hi ,
This is my code :
public int ReadNotification(int memberId, int NotificationId)
{
using (KiwiDbContext context=new KiwiDbContext(_ConnectionString))
{
NotificationData nd=new NotificationData();
nd.IsRead=true;
var quer = from n in context.Notifications where n.MemberID == memberId && n.IsRead == false select nd;
return quer;
}
}
{
using (KiwiDbContext context=new KiwiDbContext(_ConnectionString))
{
NotificationData nd=new NotificationData();
nd.IsRead=true;
var quer = from n in context.Notifications where n.MemberID == memberId && n.IsRead == false select nd;
return quer;
}
}
When I execute get an error like this :
Cannot implicitly convert type 'System.Linq.IQueryable' to int
Please resolve this issue.
Thanks


Abhay ShankerRank #375 · 6.7K reputationPosted Oct 4, 2015, 1:42 AM EDT
Priyaranjan K SRank #45 · 32.5K reputationPosted Oct 4, 2015, 3:05 AM EDT