public bool AddRole(RoleDto data) { try { var roleEntity = data.Adapt <AspNetRoles>(); roleEntity.Id = Guid.NewGuid().ToString(); _unitOfWork.RolesRepository.Insert(roleEntity); _unitOfWork.Commit(); return(true); } catch (Exception ex) { _logger.LogError(ex, string.Empty); return(false); } }