public async Task <ActionResult> Details(string id) { IStorage s = _storageFactory.ResolveStorage(); var model = await s.GetById(id); return(View("Details", model)); }
/// <summary> /// Store Log Entry from External system. /// </summary> /// <param name="entry">New log entry</param> /// <returns></returns> public async Task <IHttpActionResult> Post(NewLogEntry entry) { IStorage s = _storageFactory.ResolveStorage(); await s.StoreAsync(Mapper.Map <LogEntry>(entry)); return(Ok()); }
public async Task <IHttpActionResult> Search([FromUri] SearchOptions searchOptions) { if (searchOptions == null) { return(BadRequest("Invalid search options")); } IStorage s = _storageFactory.ResolveStorage(); var searchResult = await s.SearchAsync(searchOptions); return(Ok(searchResult)); }