Example #1
0
        public static async Task <List <Operation> > LinkCategories(this List <Operation> operations)
        {
            var categoriesAndSubCategories = await CategoriesDal.GetAllCategoriesAndSubCategoriesAsync();

            operations.ForEach(op => op.GeneralCategory = categoriesAndSubCategories.FirstOrDefault(cat => cat.GlobalId == op.CategoryGlobalId));
            return(operations);
        }
Example #2
0
 public async void Loaded()
 {
     _categoriesAndSubCategories = await CategoriesDal.GetAllCategoriesAndSubCategoriesAsync();
 }