File tree Expand file tree Collapse file tree 5 files changed +25
-6
lines changed
Entities/DataTransferObjects Expand file tree Collapse file tree 5 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 1010/Repository /bin
1111/.vs /AccountOwnerServer /v16
1212/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)
177177 return NotFound ( ) ;
178178 }
179179
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-
186180 _repository . Owner . DeleteOwner ( owner ) ;
187181 _repository . Save ( ) ;
188182
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ public MappingProfile()
1818 CreateMap < OwnerForCreationDto , Owner > ( ) ;
1919
2020 CreateMap < OwnerForUpdateDto , Owner > ( ) ;
21+
22+ CreateMap < AccountForCreationDto , Account > ( ) ;
23+
24+ CreateMap < AccountForUpdateDto , Account > ( ) ;
2125 }
2226 }
2327}
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