public ActionResult Create(NewBragViewModel viewModel)
        {
            var brag = new Brag
            {
                Author = this._runtimeSession.GetCurrentUser(),
                Title = viewModel.Title,
                Description = viewModel.Description,
                SubmittedOn = DateTime.Now
            };

            this._repository.Save(brag);

            return null;
        }
 public async Task SaveBrag(Brag brag)
 {
     brag.Id            = Guid.NewGuid().ToString();
     brag.SubmittedDate = DateTime.Now;
     await _bragContainer.CreateItemAsync(brag);
 }
Example #3
0
 public async Task SaveBrag([FromBody] Brag brag)
 {
     await _dataProvider.SaveBrag(brag);
 }