diff options
Diffstat (limited to 'Project-Unite/ACL.cs')
| -rw-r--r-- | Project-Unite/ACL.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Project-Unite/ACL.cs b/Project-Unite/ACL.cs index 88e2fc2..ca356f9 100644 --- a/Project-Unite/ACL.cs +++ b/Project-Unite/ACL.cs @@ -67,6 +67,11 @@ namespace Project_Unite return hpr.Raw(CommonMark.CommonMarkConverter.Convert(hpr.Encode(md))); } + public static int UnreadPostsCount(string username) + { + return new ApplicationDbContext().Users.FirstOrDefault(x => x.UserName == username).UnreadPosts.Length; + } + public static bool IsFollowed(string you, string fId) { var db = new ApplicationDbContext(); |
