Ejemplo n.º 1
0
        public Task CreateIncomeCategory(string name)
        {
            var parameters = new
            {
                Name = name
            };

            return(_databaseAccessor.ExecuteProcedureAsync("sp_AddIncomeCategory", parameters));
        }
Ejemplo n.º 2
0
        public Task DeleteAccountById(int id)
        {
            var parameters = new
            {
                Id = id
            };

            return(_databaseAccessor.ExecuteProcedureAsync("sp_DeleteAccount_ById", parameters));
        }
        public Task CreateExpenseSubcategory(string name, int categoryId)
        {
            var parameters = new
            {
                Name       = name,
                CategoryId = categoryId
            };

            return(_databaseAccessor.ExecuteProcedureAsync("sp_AddExpenseSubcategory", parameters));
        }
Ejemplo n.º 4
0
        public Task CreateTransfer(int sourceAccountId, int destinationAccountId, decimal amount, DateTime createDate)
        {
            var parameters = new
            {
                SourceAccountId      = sourceAccountId,
                DestinationAccountId = destinationAccountId,
                Amount     = amount,
                CreateDate = createDate
            };

            return(_databaseAccessor.ExecuteProcedureAsync("sp_AddTransfer", parameters));
        }
Ejemplo n.º 5
0
        public Task CreateExpense(string description, decimal amount, int expenseCategoryId, int expenseSubcategoryId, int accountId, DateTime createDate, DateTime?modifyDate = null)
        {
            var parameters = new
            {
                Description          = description,
                Amount               = amount,
                ExpenseCategoryId    = expenseCategoryId,
                ExpenseSubcategoryId = expenseSubcategoryId,
                AccountId            = accountId,
                CreateDate           = createDate,
                ModifyDate           = modifyDate
            };

            return(_databaseAccessor.ExecuteProcedureAsync("sp_AddExpense", parameters));
        }
Ejemplo n.º 6
0
        public Task CreateUser(string username, string salt, string passwordHash)
        {
            var parameters = new
            {
                Username     = username,
                Salt         = salt,
                PasswordHash = passwordHash
            };

            return(_databaseAccessor.ExecuteProcedureAsync("sp_AddNewUser", parameters));
        }