public ActionResult Index(string title)
{
var post = (from p in dataContext.Posts
where RemoveChar(p.Title) == title && !p.Deleted
select p).Single();
post.Visit = post.Visit + 1;
dataContext.SubmitChanges();
return View(new ViewData.PostIndexViewData(post));
}
public string RemoveChar(string Item)
{
var s = from ch in Item
where !Char.IsPunctuation(ch)
select ch;
var bytes = UnicodeEncoding.ASCII.GetBytes(s.ToArray());
var stringResult = UnicodeEncoding.ASCII.GetString(bytes);
return stringResult;
}
Est-ce possible avec System 'System.String RemoveChar (System.String)' n'a pas de traduction supportée par SQL.Linq2Sql remove char
Ouais désolé post a frappé avant que je l'ai terminé: P – John