File tree 4 files changed +15
-14
lines changed
4 files changed +15
-14
lines changed Original file line number Diff line number Diff line change 20
20
<PropertyColumn Property =" u => u.Name" />
21
21
<PropertyColumn Property =" u => u.Username" />
22
22
<PropertyColumn Property =" u => u.BirthDate" />
23
- <PropertyColumn Property =" u => u.BankAccounts.Count" Title =" Accounts" />
23
+ <PropertyColumn Property =" u => u.BankAccounts == null ? 0 : u.BankAccounts .Count" Title =" Accounts" />
24
24
</Columns >
25
25
<PagerContent >
26
26
<MudDataGridPager T =" UserDto" />
Original file line number Diff line number Diff line change 1
1
namespace WebApp . DTOs ;
2
+
2
3
public class TransactionDto
3
- {
4
- public int Id { get ; set ; }
5
- public decimal Amount { get ; set ; }
6
- public DateTime TransactionDate { get ; set ; }
7
- public BankAccountDto From { get ; set ; }
8
- public BankAccountDto To { get ; set ; }
4
+ {
5
+ public required decimal Amount { get ; init ; }
6
+ public required DateTime TransactionDate { get ; init ; }
7
+ public required BankAccountDto From { get ; init ; }
8
+ public required BankAccountDto To { get ; init ; }
9
9
}
Original file line number Diff line number Diff line change 1
1
namespace WebApp . DTOs ;
2
+
2
3
public class UserDto
3
4
{
4
- public string Username { get ; set ; }
5
- public string Name { get ; set ; }
6
- public DateTime BirthDate { get ; set ; }
7
- public ICollection < BankAccountDto > BankAccounts { get ; set ; }
8
- public ICollection < UserLoginDto > UserLogins { get ; set ; }
5
+ public required string Username { get ; init ; }
6
+ public required string Name { get ; init ; }
7
+ public required DateTime BirthDate { get ; init ; }
8
+ public ICollection < BankAccountDto > ? BankAccounts { get ; init ; }
9
+ public ICollection < UserLoginDto > ? UserLogins { get ; init ; }
9
10
}
Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ namespace WebApp.DTOs;
2
2
3
3
public class UserLoginDto
4
4
{
5
- public DateTime LoginDateTime { get ; set ; }
6
- public UserDto User { get ; set ; }
5
+ public required DateTime LoginDateTime { get ; init ; }
6
+ public required UserDto User { get ; init ; }
7
7
}
You can’t perform that action at this time.
0 commit comments