Пример #1
0
        /// <summary>
        /// Empty data context is used when the from is loaded without ID (the from is in "insert mode")
        /// </summary>
        public CategoriesDataContext GetEmptyDataContext(out string error)
        {
            CategoriesDataContext dataContext = new CategoriesDataContext();

            error = null;
            dataContext.modelNotifiedForCategoriesMain = new ModelNotifiedForCategories();;
            return(dataContext);
        }
Пример #2
0
        public CategoriesDataContext GetDataContext(int CategoryID, out string error)
        {
            CategoriesDataContext dataContext = new CategoriesDataContext();

            error = null;
            dataContext.modelNotifiedForCategoriesMain = GetCategoriesByID(CategoryID, out error);


            return(dataContext);
        }