Updated dependencies. Use new array initializer in C#. Added comments to alot of methods and classes

This commit is contained in:
martin
2023-12-06 23:43:21 +01:00
parent 2520a9ed94
commit 9991bac6fa
32 changed files with 458 additions and 160 deletions

View File

@ -4,8 +4,8 @@ namespace DAL.Database.Service;
public class UserService
{
private readonly List<User> _users = new()
{
private readonly List<User> _users =
[
new User
{
Username = "Firefox",
@ -18,10 +18,10 @@ public class UserService
Password = "Chrome",
Colour = "blue"
}
};
];
public async Task<User?> Login(string username, string password)
public Task<User?> Login(string username, string password)
{
return await Task.Run(() => _users.FirstOrDefault(x => x.Username == username && x.Password == password));
return Task.Run(() => _users.FirstOrDefault(x => x.Username == username && x.Password == password));
}
}