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

            await _commentService.CreateAsync(comment);

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

            return(Ok(comment));
        }