/// <summary> /// Returns the Guid of the specified DataView. /// </summary> /// <param name="dataViewId"></param> /// <returns>The Guid of the specified DataView, or null if the Data View does not exist.</returns> public static Guid?GetDataViewGuid(string dataViewId) { var id = dataViewId.AsIntegerOrNull(); if (id == null || id == 0) { return(null); } var dsService = new DataViewService(new RockContext()); return(dsService.GetGuid(id.Value)); }