Home Select List to Display
Reply: 0

Select List to Display

user754 Published in May 25, 2018, 6:54 pm
if (gardenvlist.Count() == days)
    var g = gardenvlist;
if (oceanvlist.Count() == days)
    var o = oceanvlist;
if (cityvlist.Count() == days)
    var c = cityvlist;

var final = g.Union(o).Union(c);

if (final.Count() > 0)
    return new ObjectResult(final);

return NotFound();

So, what I have over here is I wanted to check if the gardenvlist are available within the period. If the list is available in the period, select the list. After that check the oceanvlist and so on. Next, it will check that if the final result contains any lists. If there's one or many lists, return those lists else return false.

Sorry if my explanation is not clear enough. I'm new to programming.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.302344 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO