public async Task <IActionResult> DeleteDeveloper(long id) { try { await _developersRepository.DeleteDeveloper(id); return(NoContent()); } catch (Exception e) { return(NotFound(e.Message)); } }
public async Task <IHttpActionResult> DeleteDeveloper(int?id) { if (id == null) { return(BadRequest("Supply Id of developer")); } try { await _developersRepository.DeleteDeveloper(id); return(Ok("Record Deleted Successfully")); } catch (Exception e) { return(BadRequest(e.Message)); } }