public async Task <DefaultDataResponse> DeleteById(Guid partnerId) { var partner = await partnerRepository.GetById(partnerId); if (partner == null) { return(ErrorResponse <MiniErpErrors>(MiniErpErrors.Partner_Get_400_PartnerId_Not_Found.ToString())); } var result = await partnerRepository.DeleteById(partnerId); if (result) { return(SuccessResponse("Parceiro Excluído com sucesso")); } else { return(ErrorResponse <MiniErpErrors>(MiniErpErrors.Partner_Delete_400_Connot_Delete_Partner.ToString())); } }