Exemplo n.º 1
0
        /// <summary>
        ///     Returns the Id of the specified DataView.
        /// </summary>
        /// <param name="dataViewGuid">The Guid of an existing Data View.</param>
        /// <returns>The Id of the specified DataView, or null if the Data View does not exist.</returns>
        public static int?GetDataViewId(Guid?dataViewGuid)
        {
            if (!dataViewGuid.HasValue)
            {
                return(null);
            }

            var dsService = new DataViewService(new RockContext());

            return(dsService.GetId(dataViewGuid.Value));
        }