Link to home
Start Free TrialLog in
Avatar of Charles Baldo
Charles BaldoFlag for United States of America

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?
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Charles Baldo

ASKER

Thanks Both

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
That's because you said, "only return the text".

; )