I have the following data model:
public class JobPost
{
public in PostId {get;set;}
public bool IsRemote {get;set}
}
I'm trying to group the posts by a bool property which doesn't seem to work.
from p in posts
group p by new
{
IsRemote = p.IsRemote
} into grp
select new PostViewModel
{
IsRemote = grp.Key.IsRemote
};
Could someone please tell me how to solve this?
Thanks in advance.