File tree 5 files changed +25
-6
lines changed
Entities/DataTransferObjects
5 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 10
10
/Repository /bin
11
11
/.vs /AccountOwnerServer /v16
12
12
/AccountOwnerServer /* .user
13
+ /.vs /AccountOwnerServer /DesignTimeBuild /* .dtbcache
Original file line number Diff line number Diff line change @@ -177,12 +177,6 @@ public IActionResult DeleteOwner(Guid id)
177
177
return NotFound ( ) ;
178
178
}
179
179
180
- if ( _repository . Account . AccountsByOwner ( id ) . Any ( ) )
181
- {
182
- _logger . LogError ( $ "Cannot delete owner with id: { id } . It has related accounts. Delete those accounts first") ;
183
- return BadRequest ( "Cannot delete owner. It has related accounts. Delete those accounts first" ) ;
184
- }
185
-
186
180
_repository . Owner . DeleteOwner ( owner ) ;
187
181
_repository . Save ( ) ;
188
182
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ public MappingProfile()
18
18
CreateMap < OwnerForCreationDto , Owner > ( ) ;
19
19
20
20
CreateMap < OwnerForUpdateDto , Owner > ( ) ;
21
+
22
+ CreateMap < AccountForCreationDto , Account > ( ) ;
23
+
24
+ CreateMap < AccountForUpdateDto , Account > ( ) ;
21
25
}
22
26
}
23
27
}
Original file line number Diff line number Diff line change
1
+ using System ;
2
+
3
+ namespace Entities . DataTransferObjects
4
+ {
5
+ public class AccountForCreationDto
6
+ {
7
+ public DateTime DateCreated { get ; set ; }
8
+ public string AccountType { get ; set ; }
9
+ }
10
+ }
Original file line number Diff line number Diff line change
1
+ using System ;
2
+
3
+ namespace Entities . DataTransferObjects
4
+ {
5
+ public class AccountForUpdateDto
6
+ {
7
+ public DateTime DateCreated { get ; set ; }
8
+ public string AccountType { get ; set ; }
9
+ }
10
+ }
You can’t perform that action at this time.
0 commit comments