Exemple #1
0
        public async Task <IActionResult> Create([FromBody] CreateFeedViewModel model)
        {
            var grain  = this._client.GetGrain <IManageContentGrain>(Guid.NewGuid().ToString());
            var result = await grain.CreateFeed(model);

            return(Json(result));
        }
        public async Task <string> CreateFeed(CreateFeedViewModel model)
        {
            var feed = new Feed(model.PageId, model.Name);

            _context.Add(feed);
            await _context.SaveChangesAsync();

            return(feed.Id);
        }
        public ProfileContentViewModel(
            IPostService postService,
            IContentViewModelFactory contentViewModelFactory,
            IStateService stateService)
        {
            _postService             = postService;
            _contentViewModelFactory = contentViewModelFactory;
            _stateService            = stateService;

            IsNestedPullToRefreshEnabled = true;

            InvitesContentViewModel = ViewModelLocator.Resolve <InvitesContentViewModel>();
            InvitesContentViewModel.InitializeAsync(this);

            CreateFeedViewModel = ViewModelLocator.Resolve <CreateFeedViewModel>();
            CreateFeedViewModel.InitializeAsync(this);

            EditPostPopupViewModel = ViewModelLocator.Resolve <EditPostPopupViewModel>();
            EditPostPopupViewModel.InitializeAsync(this);
        }
 public async Task <string> CreateFeed(CreateFeedViewModel model)
 {
     return(await _createRepository.CreateFeed(model));
 }