State & City Management
States
| Id | State Name | Remove |
|---|
Add State
Cities
| Id | City Name | State Name | Is Capital | Info | Remove |
|---|
Add City
Find City Details
Business requirement — Database Operation 5
Create City and prevent two cities from being marked as capital for the same state.
- Create City with Id, StateId, Name, and IsCapital.
- Build a City form with State, Name, and Is Capital inputs.
- Before saving a capital, query for another capital in the selected state.
- Stop the save and show a clear message if one already exists.
- Show a spinner until a valid save finishes.