public async Task <IActionResult> Delete(int landlordId, int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = await _provider.DeleteProperty(id); if (!result.Value) { return(NotFound()); } if (result == null) { return(StatusCode(500, "A problem occurred while handling your request.")); } return(NoContent()); }
public bool DeleteProperty(int id) { return(_PropertyProvider.DeleteProperty(id)); }