I'd consider myself pretty qualified to answer this question because we just closed on our new house in Capitol Hill YESTERDAY! We've been actively looking since October and have had one contract make it to within 3 days of closing only to have it turn into a probate nightmare, so it is an unspeakable relief.
We are in a similar situation. Boyfriend bought the house and I will be paying him rent. We live together currently. I wouldn't have opted for Capitol Hill myself because it is so expensive, but we actually managed to get a deal (by DC standards) on a little row house, so I can't really complain. We live there now (only moving 2 blocks).
Please, let me urge you NOT to buy a condo. We were looking at a similar thing at first, but after spending a lot of time talking to our WONDERFUL realtor, and my BF's wildly successful father who was a DC real estate attorney before he FIREd, we realized it's an awful investment.
Condos in DC are a dime a dozen, and there are literally thousands being built as we speak. Selling a used condo is a real trial in this city, because you are competing with all of the new ones going up which have awesome amenities, builder finance incentives, and cheap-as-hell introductory condo fees. It becomes even worse when there are other units available for sale in your same building. It is not a way to make money. Even unique and beautiful buildings in great locations are not immune (let me tell you about the poor sap who spent 1.2 million on a condo in an old school in Capitol Hill last October and just sold it this month for 850K...).
If you are committed to buying in DC, please look for a house. There are still "deals" to be had in places like Ekington and even Brookland, and if you have a high tolerance for "transitioning" areas then you can find some gems near RFK and Benning Road. I don't know much about the northern parts of the city, but our realtor initially steered us to look in Columbia Heights as well. Read urbanturf.com- it has wonderful neighborhood profiles.
Personally if you are only planning on staying for 2 years then I don't think it is worth it. I'm sure you can find a better apartment or maybe even a house. Several of the houses we were looking at have been turned into rentals in the interim for not crazy amounts of money. 2 years isn't enough time to see it become a viable investment, and let me tell you that the hassle alone is enough to put me off of doing this again for a long, long time (and I didn't even buy the damn thing!).
Also, I echo a previous commenter that I think the DC bubble is going to burst soon. We're planning on keeping this place as a rental if/when we decide to move, but will likely live here for a minimum of 5 years. Hopefully it will recover by then, but we're actually anticipating losing some equity in the upcoming years...