How To Determine Residency: MD (Permanent Home) and DC (Rent an Apartment for Work)

My permanent home is in Maryland (MD), which is also the state where I am registered to vote, where my vehicle is registered, where most of my belongings reside, where I reside when not at work, and where my employer is headquartered.  For convenience and a shorter commute, I will be renting an apartment in the District of Columbia (DC) for the next year-and-a-half while I am on assignment at another location (it's cheaper than a hotel) and also maintain my rental property in MD.  Both MD and DC define "residency" by the number of days one resides in the state (more than 183 days in a year or where one maintains an "abode"), and by that definition alone, I spend slightly more days/nights in MD than in DC.  I do not consider DC to be my home, however, and have no plans to change my permanent address, voter registration, vehicle registration, etc.  How do I determine which state I should pay income taxes in given these circumstances and how each state defines "resident" status?