Exemple #1
0
 public ServiceOfUser(
     ApplicationDbContext context,
     UserManager <ApplicationUserEntity> userManager,
     IMapper mapper,
     ServiceOfImage serviceOfImage,
     ServiceOfSearch serviceOfSearch,
     IRepository <IdentityUserRole <string> > repositoryOfIdentityUserRole,
     IRepository <ApplicationUserEntity> repositoryOfApplicationUser,
     IRepository <UserProfileEntity> repositoryOfUserProfile,
     IRepository <IdentityUserClaim <string> > repositoryOfUserClaim,
     IRepository <PostEntity> repositoryOfPost,
     IRepository <RoleEntity> repositoryOfRole
     )
 {
     this.mapper      = mapper;
     this.userManager = userManager;
     this.repositoryOfIdentityUserRole = repositoryOfIdentityUserRole;
     this.repositoryOfApplicationUser  = repositoryOfApplicationUser;
     this.repositoryOfUserProfile      = repositoryOfUserProfile;
     this.repositoryOfUserClaim        = repositoryOfUserClaim;
     this.repositoryOfPost             = repositoryOfPost;
     this.repositoryOfRole             = repositoryOfRole;
     this.serviceOfImage  = serviceOfImage;
     this.serviceOfSearch = serviceOfSearch;
 }
Exemple #2
0
        public ServiceOfPost(
            IMapper mapper,
            ServiceOfImage serviceOfImage,
            ServiceOfAccount serviceOfAccount,
            ServiceOfComment serviceOfComment,
            ServiceOfUser serviceOfUser,
            ServiceOfTag serviceOfTag,
            ServiceOfSearch serviceOfSearch,
            IRepository <PostEntity> repositoryOfPost,
            IRepository <PostRatingEntity> repositoryOfPostRating,
            IRepository <ApplicationUserEntity> repositoryOfApplicationUser,
            IRepository <SectionEntity> repositoryOfSection,
            IRepository <ImageEntity> repositoryOfImage
            )
        {
            this.mapper                      = mapper;
            this.repositoryOfPost            = repositoryOfPost;
            this.repositoryOfPostRating      = repositoryOfPostRating;
            this.repositoryOfApplicationUser = repositoryOfApplicationUser;
            this.repositoryOfSection         = repositoryOfSection;
            this.repositoryOfImage           = repositoryOfImage;
            this.serviceOfImage              = serviceOfImage;
            this.serviceOfAccount            = serviceOfAccount;
            this.serviceOfComment            = serviceOfComment;
            this.serviceOfUser               = serviceOfUser;
            this.serviceOfTag                = serviceOfTag;
            this.serviceOfSearch             = serviceOfSearch;

            Config = new Tuple <string, Func <PostEntity, ApplicationUserEntity, BasePostViewModel> >[]
            {
                new Tuple <string, Func <PostEntity, ApplicationUserEntity, BasePostViewModel> >(nameof(PostCompactViewModel), GetPostCompactViewModel),
                new Tuple <string, Func <PostEntity, ApplicationUserEntity, BasePostViewModel> >(nameof(PostUpdateViewModel), GetPostUpdateViewModel),
                new Tuple <string, Func <PostEntity, ApplicationUserEntity, BasePostViewModel> >(nameof(PostMiniViewModel), GetPostMiniViewModel),
                new Tuple <string, Func <PostEntity, ApplicationUserEntity, BasePostViewModel> >(nameof(PostViewModel), GetPostViewModel)
            };
        }
Exemple #3
0
 public ServiceOfComment(
     IMapper mapper,
     ServiceOfUser serviceOfUser,
     ServiceOfSearch serviceOfSearch,
     IRepository <PostEntity> repositoryOfPost,
     IRepository <CommentEntity> repositoryOfComment,
     IRepository <CommentLikeEntity> repositoryOfCommentLike,
     IRepository <ApplicationUserEntity> repositoryOfApplicationUser,
     IRepository <UserProfileEntity> repositoryOfUserProfile
     )
 {
     this.mapper                      = mapper;
     this.repositoryOfPost            = repositoryOfPost;
     this.repositoryOfComment         = repositoryOfComment;
     this.repositoryOfCommentLike     = repositoryOfCommentLike;
     this.repositoryOfApplicationUser = repositoryOfApplicationUser;
     this.repositoryOfUserProfile     = repositoryOfUserProfile;
     this.serviceOfUser               = serviceOfUser;
     Config = new[]
     {
         new Tuple <string, Func <CommentEntity, ApplicationUserEntity, BaseCommentViewModel> >(nameof(CommentViewModel), GetCommentViewModel),
         new Tuple <string, Func <CommentEntity, ApplicationUserEntity, BaseCommentViewModel> >(nameof(CommentMiniViewModel), GetCommentMiniViewModel)
     };
 }
 public RepositoryOfPostRating(ApplicationDbContext context, ServiceOfSearch serviceOfSearch) : base(context)
 {
     this.serviceOfSearch = serviceOfSearch;
 }
 public ServiceOfSection(IMapper mapper, ServiceOfSearch serviceOfSearch, IRepository <SectionEntity> repositoryOfSection, IRepository <PostEntity> repositoryOfPost)
 {
     this.mapper = mapper;
     this.repositoryOfSection = repositoryOfSection;
     this.repositoryOfPost    = repositoryOfPost;
 }
 public RepositoryOfUserProfile(ApplicationDbContext context, ServiceOfSearch serviceOfSearch) : base(context)
 {
     this.serviceOfSearch = serviceOfSearch;
 }
Exemple #7
0
 public RepositoryOfCommentLike(ApplicationDbContext context, ServiceOfSearch serviceOfSearch) : base(context)
 {
     this.serviceOfSearch = serviceOfSearch;
 }