public virtual async Task <string> CreateValidFeatureKeyAsync(TFeature feature) { var featureName = feature.Name.Replace(" ", "-"); featureName = featureName.ToLower(); var duplicateFeatureName = await IsFeatureKeyExistsAsync(featureName); if (duplicateFeatureName) { featureName = featureName + "-" + DaRandomNumberUtil.GenerateInt(); } return(featureName); }
public virtual async Task <string> CreateValidAppKeyAsync(TApp app) { var appName = app.Name.Replace(" ", "-"); appName = appName.ToLower(); var duplicateFeatureName = await IsAppKeyExistsAsync(appName); if (duplicateFeatureName) { appName = appName + "-" + DaRandomNumberUtil.GenerateInt(); } return(appName); }