public BudgetCategory RandomBudgetCategory(Budget budget, eBudgetCategoryType budgetCategoryType) { var icon = new BudgetCategoryIcon(new BudgetCategoryIconId(), RandomString(4)); return(BudgetCategory.Create(budget, RandomString(4), icon, budgetCategoryType)); }
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); }
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; }