public customeraccount createAccount([FromBody] Customer customer)
        {
            GetListRep ob = new GetListRep();
            var        customeraccounts = ob.GetCustomeraccountsList();

            _log4net.Info("Account Created");
            customeraccount a = new customeraccount
            {
                custId = customer.id,
                CAId   = (customer.id * 100) + acid,
                SAId   = (customer.id * 100) + (acid + 1)
            };

            customeraccounts.Add(a);
            var            cust = customeraccounts.Find(c => c.custId == customer.id);
            CurrentAccount ca   = new CurrentAccount
            {
                CAId = (customer.id * 100) + acid,
                CBal = 0.00
            };
            SavingsAccount sa = new SavingsAccount
            {
                SAId = (customer.id * 100) + (acid + 1),
                SBal = 0.00
            };

            return(cust);
        }
Example #2
0
        public customeraccount createAccount([FromBody] Customer customer)
        {
            customeraccount a = new customeraccount
            {
                custId = customer.id,
                CAId   = (customer.id * 100) + acid,
                SAId   = (customer.id * 100) + (acid + 1)
            };

            customeraccounts.Add(a);
            var            cust = customeraccounts.Find(c => c.custId == customer.id);
            CurrentAccount ca   = new CurrentAccount
            {
                CAId = (customer.id * 100) + acid,
                CBal = 0.00
            };
            SavingsAccount sa = new SavingsAccount
            {
                SAId = (customer.id * 100) + (acid + 1),
                SBal = 0.00
            };

            return(cust);
        }