public async Task DeleteAsync(int id)
 {
     try
     {
         await meetingService.DeleteAsync(id);
     }
     catch (Exception ex)
     {
         logger.Error($"Exception occured in DeleteAsync", ex);
     }
 }
コード例 #2
0
        public async Task <IActionResult> DeleteAsync(int meetingId)
        {
            var result = await _meetingService.DeleteAsync(meetingId);

            if (!result.Success)
            {
                return(BadRequest(result.Message));
            }
            var meetingResource = _mapper.Map <Meeting, MeetingResource>(result.Resource);

            return(Ok(meetingResource));
        }
コード例 #3
0
        // GET: Meetings/Delete/5
        public async Task <ActionResult> Delete(int id)
        {
            await meetingService.DeleteAsync(id);

            return(RedirectToAction("Index"));
        }
コード例 #4
0
        public async Task <ActionResult <string> > DeleteMeeting(int id)
        {
            await meetingService.DeleteAsync(id);

            return(Ok("Deleted"));
        }
コード例 #5
0
 public async Task DeleteAsync(int id)
 {
     logger.Info($"Deleting meeting {id}");
     await meetingService.DeleteAsync(id);
 }
コード例 #6
0
 public async Task DeleteAsync(int id)
 {
     await policy.ExecuteAsync(async() => await meetingService.DeleteAsync(id));
 }
コード例 #7
0
 public async Task <IActionResult> Delete(long id)
 {
     return(HandleServiceResponse(await _service.DeleteAsync(GetClaims(), id)));
 }