public async Task <IActionResult> DeleteContact([FromForm] long Id) { try { if (Id <= 0) { return(StatusCode((int)System.Net.HttpStatusCode.BadRequest, "Id not found!")); } else { var result = await _contactRepo.DeleteAsync(Id); return(Ok(result)); } } catch (Exception ex) { return(StatusCode((int)System.Net.HttpStatusCode.InternalServerError, ex.Message)); } }