Charles Baldo
asked on
Need LINQ to get substring
I have this LINQ
var ArticleList = (from s in db.Articles
where s.ArticleContent.Contains( "<more>")
select s).ToList();
What I am looking to do is only return the text in ArticleContent up to the substring "<more>"
is this possible?
var ArticleList = (from s in db.Articles
where s.ArticleContent.Contains(
select s).ToList();
What I am looking to do is only return the text in ArticleContent up to the substring "<more>"
is this possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That's because you said, "only return the text".
; )
; )
ASKER
I had an issue with the fact that it produced a list<string> and I needed list<Articles> but was able to modify and learned from both answers