Esempio n. 1
0
        /// <summary>
        /// Gets ICrudDataStore context for Corporate Area
        /// </summary>
        public static ICrudDataStore GetCrudData(this IForestDataSource forestData, TreePtr tree)
        {
            var tds = forestData.NonNull(nameof(forestData)).TryGetTreeDataStore(tree.IdForest, tree.IdTree);

            if (tds == null)
            {
                var tnmsg = "Forest tree `{0}` is not found".Args(tree);
                throw new ValidationException(tnmsg)
                      {
                          HttpStatusCode = 404, HttpStatusDescription = tnmsg
                      };
            }

            return((tds as ICrudDataStore).NonNull(DATA_STORE_CLAUSE));
        }
Esempio n. 2
0
 protected override bool DoApplicationAfterInit()
 {
     m_Data.NonNull(nameof(Data)).Start();
     return(base.DoApplicationAfterInit());
 }