Hello,
I have the following:
postBook.Leafs = (from p in database.Posts
select new PostLeaf {
Post = p,
}).ToPagedList( page.HasValue ?
page.Value - 1 : 0, ResumePageSize) ;
postBook.Leafs. Select(l =l.Post.Excerpt = (String.IsNullO rEmpty
(l.Post.Excerpt ) ? l.Post.Body : l.Post.Excerpt) );
Basically, I need to define each post.Excerpt equal to post.Body if
the post.Excerpt is empty.
I don't have any compilation error but the excerpts that are null keep
being null ...
What am I doing wrong?
Thanks,
Miguel
I have the following:
postBook.Leafs = (from p in database.Posts
select new PostLeaf {
Post = p,
}).ToPagedList( page.HasValue ?
page.Value - 1 : 0, ResumePageSize) ;
postBook.Leafs. Select(l =l.Post.Excerpt = (String.IsNullO rEmpty
(l.Post.Excerpt ) ? l.Post.Body : l.Post.Excerpt) );
Basically, I need to define each post.Excerpt equal to post.Body if
the post.Excerpt is empty.
I don't have any compilation error but the excerpts that are null keep
being null ...
What am I doing wrong?
Thanks,
Miguel
Comment