public IActionResult Index() { var viewModel = new ExistenceModel(); viewModel.KnownPlaces = _dataCache.GetAll <IPlace>(); return(View(viewModel)); }
/// <summary> /// Dumps everything of a single type into the cache from the database for BackingData /// </summary> /// <typeparam name="T">the type to get and store</typeparam> /// <returns>success status</returns> public bool PreLoadAll <T>(Type baseClass) where T : IData { foreach (IData thing in DataCache.GetAll <T>()) { var entityThing = Activator.CreateInstance(baseClass, new object[] { (T)thing }) as IEntity; entityThing.UpsertToLiveWorldCache(); } return(true); }
public void OnGet() { PersonaCount = _dataCache.GetAll <IPersona>().Count(); ThingCount = _dataCache.GetAll <IThing>().Count(); PlaceCount = _dataCache.GetAll <IPlace>().Count(); }