Ellen:
I located the census record. The registration district is Cork and I searched for civil death index records for Daniel McNamara in that district. The best record is below but there is no guarantee that this is your ancestor. I also found a record in 1866 but I was not sure what year their youngest child was born.
RC church records are included on www.irishgenealogy.ie which is a free Irish government site. I looked at the Douglas records for Margaret's baptismal record and the closest was in 1826. See below There was also an 1824 record in Douglas. I was unable to find the marriage record. Here are the parish register links for Douglas and Carragline.
http://registers.nli.ie/parishes/0045 http://registers.nli.ie/parishes/0025
Roger
First name(s)DanielLast nameM'NamaraAge at death40Birth year1833Registered year1873Registered quarter/year1873Registration districtCorkVolume15Page121CountyCorkCountryIreland
First name(s)DanielLast nameM'NamaraAge at death52Birth year1814Registered year1866Registered quarter/year1866Registration districtCorkVolume5Page148CountyCork
Area - CORK & ROSS (RC) , Parish/Church/Congregation - DOUGLAS
Baptism of MARGT COGAN of AHANTRIM on 16 June 1826
NameMARGT COGANDate of BirthN/R N/R N/RAddressAHANTRIMFatherWM COGANMotherJOHA HANLY
Further details in the record
Sponsor 1THOS SULLIVANSponsor 2ELLEN TWOMYRecorded Parochial AreaDOUGLAS