private void GenerateSEO() { if (string.IsNullOrEmpty(this.SeoName)) { this.SeoName = SEOHelper.GetSEOString(this.Title); } int i = 1; string name = SeoName; while (BEProductViewModel.Repository.CheckIsExists(a => a.SeoName == name && a.Specificulture == Specificulture && a.Id != Id)) { name = SeoName + "_" + i; i++; } SeoName = name; if (string.IsNullOrEmpty(this.SeoTitle)) { this.SeoTitle = SEOHelper.GetSEOString(this.Title); } if (string.IsNullOrEmpty(this.SeoDescription)) { this.SeoDescription = SEOHelper.GetSEOString(this.Title); } if (string.IsNullOrEmpty(this.SeoKeywords)) { this.SeoKeywords = SEOHelper.GetSEOString(this.Title); } }
private void GenerateSEO(SiocCmsContext _context = null, IDbContextTransaction _transaction = null) { if (string.IsNullOrEmpty(this.SeoName)) { this.SeoName = SEOHelper.GetSEOString(this.Title); } int i = 1; string name = SeoName; while (InfoCategoryViewModel.Repository.CheckIsExists(a => a.SeoName == name, _context, _transaction)) { name = SeoName + "_" + i; i++; } SeoName = name; if (string.IsNullOrEmpty(this.SeoTitle)) { this.SeoTitle = SEOHelper.GetSEOString(this.Title); } if (string.IsNullOrEmpty(this.SeoDescription)) { this.SeoDescription = SEOHelper.GetSEOString(this.Title); } if (string.IsNullOrEmpty(this.SeoKeywords)) { this.SeoKeywords = SEOHelper.GetSEOString(this.Title); } }
private void GenerateSEO() { if (string.IsNullOrEmpty(this.SeoName)) { this.SeoName = SEOHelper.GetSEOString(this.Title); } if (string.IsNullOrEmpty(this.SeoTitle)) { this.SeoTitle = SEOHelper.GetSEOString(this.Title); } if (string.IsNullOrEmpty(this.SeoDescription)) { this.SeoDescription = SEOHelper.GetSEOString(this.Title); } if (string.IsNullOrEmpty(this.SeoKeywords)) { this.SeoKeywords = SEOHelper.GetSEOString(this.Title); } }