Last active
March 10, 2017 13:11
-
-
Save Kinani/0526593dda059b2095877a7d3ead17eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Net; | |
using System.Threading.Tasks; | |
using UltraReadingWeb.Models; | |
using UltraReadingWeb.Common; | |
namespace UltraReadingWeb.Controllers | |
{ | |
public class UltraReadingController : Controller | |
{ | |
[ActionName("Index")] | |
public async Task<ActionResult> IndexAsync() | |
{ | |
var items = await DocDBRepo<UltraReading>.GetItemsAsync(r => r.Reading != string.Empty); | |
// Important: Not the best optimized way to do it, acutally it's very harmful to the user exprience. | |
// You may want to explore another option. | |
return View(items.Reverse().Take(15)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment