public ActionResult Index(string id) { string recordId = VerbosifyId <Record>(id); if (!_permissionManager.DoesExist <Record>(recordId)) { return(HttpNotFound()); } var viewModel = new { Record = _sightingViewModelQuery.BuildSighting(recordId) }; return(RestfulResult( viewModel, "records", "index")); }
public ActionResult Index(string id) { string observationId = VerbosifyId <Observation>(id); if (!_permissionManager.DoesExist <Observation>(observationId)) { return(HttpNotFound()); } dynamic viewModel = new ExpandoObject(); viewModel.Observation = _sightingViewModelQuery.BuildSighting(observationId); return(RestfulResult( viewModel, "observations", "index")); }