Пример #1
0
        public void Init(IPostComment view, bool IsPostBack)
        {
            _view = view;

            if(_userSession.CurrentUser != null)
                _view.ShowCommentBox(true);
            else
                _view.ShowCommentBox(false);
        }
Пример #2
0
        public void Init(IPostComment view, bool IsPostBack)
        {
            _view = view;

            if (_userSession.CurrentUser != null)
            {
                _view.ShowCommentBox(true);
            }
            else
            {
                _view.ShowCommentBox(false);
            }
        }
        public TestingDatabase()
        {
            _connection = new SqliteConnection("Filename=:memory:");
            _connection.Open();

            _db = new SMModelersContext(
                new DbContextOptionsBuilder <SMModelersContext>()
                .UseSqlite(_connection)
                .Options);

            _db.Database.EnsureCreated();

            _comment = new PostCommentManager(_db);

            _image = new PostImageManager(_db, _cloudImage, _s3Provider);

            _post = new UserPostManager(_db, _comment, _image);
        }
 public UserPostController(IUserPost userPost, IPostComment postComment, UserManager <ApplicationUser> userManager)
 {
     _userPost    = userPost;
     _postComment = postComment;
     _userManager = userManager;
 }
Пример #5
0
 public PostCommentController(IPostComment postComment, UserManager <ApplicationUser> userManager)
 {
     _postComment = postComment;
     _userManager = userManager;
 }
Пример #6
0
 public UserPostManager(SMModelersContext context, IPostComment postComment, IPostImage postImage)
 {
     _context     = context;
     _postComment = postComment;
     _postImage   = postImage;
 }
Пример #7
0
 public CommentController(IPostComment repo)
 {
     _repo = repo;
 }
Пример #8
0
 public void Post([FromBody] CommentDto dto,
                  [FromServices] IPostComment command)
 {
     executor.ExecuteCommand(command, dto);
 }