public async Task DeleteAsync(Guid id, Guid organisationId) { if (!await ExistsAsync(id, organisationId)) { throw new GreenFieldNotFoundException(); } await _repository.DeleteAsync(id); }
public async Task <string> Delete(String id) { try { await fieldRepository.DeleteAsync(ObjectId.Parse(id)); return("Xóa thành công"); } catch (Exception) { throw new Exception("Xóa thất bại."); } }