public List <Typle <Guid, int, int, int> > GetAuthorsStatistic() { var postsCount = _storage.GetPostDao().GetPostsCountByAuthor(null); var postsCommentsCount = _storage.GetPostDao().GetCommentsCountByAuthorPosts(null); var postsReviewCount = _storage.GetPostDao().GetReviewCountByAuthorPosts(null); List <Typle <Guid, int, int, int> > result = new List <Typle <Guid, int, int, int> >(postsCount.Count); Typle <Guid, int> empty = new Typle <Guid, int>(); foreach (var author in postsCount) { result.Add( new Typle <Guid, int, int, int> { Value1 = author.Value1, Value2 = author.Value2, Value3 = (postsCommentsCount.Find(t => t.Value1 == author.Value1) ?? empty).Value2, Value4 = (postsReviewCount.Find(t => t.Value1 == author.Value1) ?? empty).Value2 } ); } return(result); }
public Contact(Typle <EmaiAddress, PostalAddress> emailAndPostalAddress) : base(emailAndPostalAddress) { }