My Sql Query Is:
select count(*),CONVERT(varchar, AddedOn, 101)
from MemberNotifications where IsActive=1
group by CONVERT(varchar, AddedOn, 101)
order by CONVERT(varchar, AddedOn, 101) desc
but i m not able to get result, in following attempt
List<NotificationCounts> lst =
(from mn in this.MemberNotifications
where mn.UId.Equals(friendId)
select new NotificationCounts{ NotificationDate = mn.AddedOn.ToString("mm/dd/yyyy") })
.ToList<NotificationCounts>();
I want to get only list of date in string for mat but it is giving an exception
LINQ to Entities does not recognize the method 'System.String ToString(System.String)' method, and this method cannot be translated into a store expression.
Is there any solution for this error?