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;
}
Is this possible as I get Method 'System.String RemoveChar(System.String)' has no supported translation to SQL.