示例#1
0
        public async Task <Account> GetAccountAsync()
        {
            var account = await _context.Accounts.FirstOrDefaultAsync();

            if (account is null)
            {
                account = new Account();
                await _context.AddAsync(account);

                await _context.SaveChangesAsync();
            }

            return(account);
        }