示例#1
0
        public BudgetCategory RandomBudgetCategory(Budget budget, eBudgetCategoryType budgetCategoryType)
        {
            var icon = new BudgetCategoryIcon(new BudgetCategoryIconId(), RandomString(4));

            return(BudgetCategory.Create(budget,
                                         RandomString(4),
                                         icon,
                                         budgetCategoryType));
        }
示例#2
0
        public static BudgetCategory Create
            (Budget budget,
            string name,
            BudgetCategoryIcon icon,
            eBudgetCategoryType budgetCategoryType)
        {
            var category = new BudgetCategory()
            {
                BudgetCategoryId   = new BudgetCategoryId(),
                BudgetCategoryType = budgetCategoryType,
                BudgetId           = budget.BudgetId
            };

            category.SetIcon(icon);
            category.SetName(name);
            return(category);
        }
示例#3
0
        public async Task <ActionResult> SpendingBalance([FromRoute] int budgetId, [FromRoute] eBudgetCategoryType categoryType)
        {
            var response = await Mediator.Send(new GetCategoryTypeBalance.Query(budgetId, categoryType));

            return(Ok(response));
        }
 public Query(int budgetId, eBudgetCategoryType budgetCategoryType)
 {
     BudgetId           = budgetId;
     BudgetCategoryType = budgetCategoryType;
 }