public IEnumerable<UserBlogDto> GetBlockedBlogs(IRepository<User> userRepository, int userId)
 {
     var user = userRepository.GetSingle(u => u.UserId == userId);
     return user.BlockedBlogs.Select(b => b.ToDto());
 }
 public PipelineViewDto GetPipeline(int? pipelineId, IRepository<PipelineView> pipelineRepository)
 {
     return pipelineRepository.GetSingle(p => p.PipelineViewId == pipelineId.Value).ToDto();
 }
 public UserDto GetUser(IRepository<User> userRepository, int userId)
 {
     var user = userRepository.GetSingle(u => u.UserId == userId);
     return user != null ? user.ToDto() : null;
 }