/// <summary> /// Provides a list of observational data services. /// </summary> /// <returns></returns> public ActionResult ObservationalDataServices() { DataServiceTable dataTable = new DataServiceTable() { ItemUrl = "Observational-Data/", Entries = new List <DataServiceTableEntry>() }; var services = db.ODMDatabases; foreach (var item in services) { DataServiceTableEntry entry = new DataServiceTableEntry { DatabaseID = item.DatabaseID, Title = item.Title, Abstract = item.Abstract, Citation = item.Citation, ServerName = item.ServerAddress, Topic = item.TopicCategory, DatabaseName = item.DatabaseName }; dataTable.Entries.Add(entry); } return(View(dataTable)); }
public ActionResult Regions() { DataServiceTable dataTable = new DataServiceTable() { ItemUrl = "Region/", Entries = new List <DataServiceTableEntry>() }; var regions = db.Regions; foreach (var item in regions) { //var rd = db.RegionDatabases.First(r => r.RegionID == item.RegionID); //var database = db.ODMDatabases.First(o => o.DatabaseID == rd.DatabaseID); DataServiceTableEntry entry = new DataServiceTableEntry { DatabaseID = item.RegionID, Title = item.RegionTitle, Abstract = item.RegionDescription, Topic = item.RegionName, // DatabaseName = database.DatabaseName }; dataTable.Entries.Add(entry); } return(View(dataTable)); }
/// <summary> /// /// Provides a list of GIS data services. /// </summary> /// <returns></returns> public ActionResult GISDataServices() { DataServiceTable dataTable = new DataServiceTable() { ItemUrl = "GIS-Data/", Entries = new List <DataServiceTableEntry>() }; var services = db.MapServices; foreach (var item in services) { DataServiceTableEntry entry = new DataServiceTableEntry { DatabaseID = item.MapServiceID, Title = item.Title, Abstract = item.Abstract, ServerName = item.MapServer.MapServerName, Topic = item.TopicCategory }; dataTable.Entries.Add(entry); } return(View(dataTable)); }