public async Task <IActionResult> Create([Bind("id,ProviderID,AccountName,CurrencyID,AccountTypeID,AccountHolderName,AccountHolderAddress,AccountNo,IBAN,BSB,BankCode,BankName,SWIFT,CountryID,BranchAddress,Reference,DateTimeModified,DateTimeAdded")] ProviderBankAccount providerBankAccount) { if (ModelState.IsValid) { providerBankAccount.DateTimeModified = Utility.GetLocalDateTime(); providerBankAccount.DateTimeAdded = Utility.GetLocalDateTime(); _context.Add(providerBankAccount); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewBag.Provider = new SelectList(_context.Provider.OrderBy(m => m.ProviderName).ToList(), "id", "ProviderName"); ViewBag.Currency = new SelectList(_context.Currency.OrderBy(m => m.CurrencyName).ToList(), "id", "CurrencyName"); ViewBag.AccountType = new SelectList(_context.AccountType.ToList(), "id", "AccountTypeName"); ViewBag.Country = new SelectList(_context.Country.OrderBy(m => m.CountryName).ToList(), "id", "CountryName"); return(View(providerBankAccount)); }