Kod: Tümünü seç
public static string urtlConvert(string text)
{
return text.ToLower().Replace(" ", "-").Replace("&", "-").Replace("ü", "u").Replace("ö", "o").Replace("ı", "i").Replace("İ", "I").Replace("ş", "s").Replace("ç", "c").Replace("ğ", "g").Replace("%", "").Replace("'", "").Replace("_", "-");
}
Kod: Tümünü seç
Product p = productRepo.GetAll().Include(i => i.ProductPictures).AsEnumerable().Where(g => g.ID == id && GeneralTool.urtlConvert(g.Name) == name).FirstOrDefault();