예제 #1
0
        public async Task <bool> CreateCompanyHoldingAsync(CompanyHolding companyHolding)
        {
            try
            {
                _context.CompaniesHoldings.Add(companyHolding);
                await _context.SaveChangesAsync();

                return(true);
            }
            catch (Exception)
            {
                //Error handle
                return(false);
            }
        }
        public async Task <bool> UpdateLastLoginDateAsync(User user)
        {
            try
            {
                user.LastLoginDate = DateTime.Now;
                await _context.SaveChangesAsync();

                return(true);
            }
            catch (Exception)
            {
                //Error handle
                return(false);
            }
        }
        public async Task <bool> CreateBankAccountAsync(BankAccount bankAccount)
        {
            try
            {
                await _context.BankAccounts.AddAsync(bankAccount);

                await _context.SaveChangesAsync();

                return(true);
            }
            catch (Exception)
            {
                //Error handle
                return(false);
            }
        }