Example #1
0
        public async Task <IActionResult> Create(BusinessLogic.ViewModels.Comment comment)
        {
            if (comment == null)
            {
                return(BadRequest());
            }

            await _commentService.CreateAsync(comment);

            return(Ok());
        }
Example #2
0
 public async Task Update(BusinessLogic.ViewModels.Comment comment)
 {
     await _commentService.Update(comment);
 }
Example #3
0
        public async Task <IActionResult> Get(int id)
        {
            BusinessLogic.ViewModels.Comment comment = await _commentService.GetByIdAsync(id);

            return(Ok(comment));
        }