Mr. Hevesi , 31 , a Democrat who took a leave from his job as director of community affairs for Public Advocate Betsy Gotbaum to run for Mr. Cohen 's seat in the 28th Assembly District , defeated Anthony Como , a Republican who is an assistant district attorney in Queens .