Complex sentence: It is the county seat of Dakota County, which contains most of the city; a small part extends into Washington County.
Split into simpler sentences: It is the county seat of Dakota County. The bulk of Hastings is located within Dakota County; only a small part of the city extends into Washington County.