public async Task <IActionResult> DeleteUserprofileById(Guid id) { try { if (id != null) { dynamic deleteById = await _userprofile.DeleteUserProfileById(id); if (deleteById.Success == false) { return(NotFound(deleteById)); } return(Ok()); } return(BadRequest("Profile Id cannot be null")); } catch (Exception ex) { throw; } }