mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
Fix LINQ bug.
This commit is contained in:
parent
32e2eecdd4
commit
7111f0d5cd
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ public ForumPost[] UnreadPosts
|
|||
var db = new ApplicationDbContext();
|
||||
|
||||
|
||||
var posts = db.ForumPosts.Where(x => ACL.IsUnlisted(x.Parent) && db.ReadPosts.FirstOrDefault(y => y.UserId == this.Id && y.PostId == x.Id) == null);
|
||||
var posts = db.ForumPosts.Where(x => db.ForumTopics.FirstOrDefault(z=>z.Id==x.Parent).IsUnlisted == false && db.ReadPosts.FirstOrDefault(y => y.UserId == this.Id && y.PostId == x.Id) == null);
|
||||
return posts.ToArray();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue