private AccountDto AuthenticateUser(AccountDto account) { var accounts = new AccountDto[] { new AccountDto { Email = "test1Email", FullName = "test1FullName", Password = "******", Username = "******" }, new AccountDto { Email = "test2Email", FullName = "test2FullName", Password = "******", Username = "******" }, new AccountDto { Email = "test3Email", FullName = "test3FullName", Password = "******", Username = "******" }, new AccountDto { Email = "test4Email", FullName = "test4FullName", Password = "******", Username = "******" }, new AccountDto { Email = "test5Email", FullName = "test5FullName", Password = "******", Username = "******" }, new AccountDto { Email = "test6Email", FullName = "test6FullName", Password = "******", Username = "******" } }; var foundAccount = accounts.FirstOrDefault(a => a.Username == account.Username && a.Password == account.Password); if (foundAccount != null) { return(new AccountDto { Email = foundAccount.Email, FullName = foundAccount.FullName, Username = foundAccount.Username }); } return(null); }