コード例 #1
0
        public async Task <object> Delete(string UID)
        {
            bool isValid = await _companiesService.DeleteCompany(UID);

            _notification.SetNotificationMessage(isValid, Title, UID);

            return(_notification);
        }
コード例 #2
0
 public async Task <IActionResult> Delete(Guid id)
 {
     if (await _companiesService.DeleteCompany(id))
     {
         return(NoContent());
     }
     else
     {
         return(NotFound());
     }
 }
コード例 #3
0
 public ActionResult <DeleteModel> Deletecompany(int companyId)
 {
     try
     {
         return(Ok(_companyService.DeleteCompany(companyId)));
     }
     catch (NotFoundOperationException ex)
     {
         return(NotFound(ex.Message));;
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, $"Something happend: {ex.Message}"));
     }
 }
コード例 #4
0
 public void DeleteCompany(long id)
 {
     _companiesService.DeleteCompany(id);
 }
コード例 #5
0
 public async Task <IHttpActionResult> DeleteCompany(int id)
 {
     return(await GetMyResult(() => _companiesService.DeleteCompany(id)));
 }