Before answering the specific question, it is important to know that in Ontario if you have already made a Will, then your legal situation might be impacted merely by the fact that you later got married. Unless you have made the Will expressly in contemplation of marriage, then it is automatically revoked once you get married. (The effect of your Will is unchanged if you and your partner separate, however – even if that separation lasts for years.)
With that said, a domestic contract, such as a marriage agreement or a cohabitation agreement, does not necessarily impact or “trump” a properly executed Will, unless the contract expressly refers to and addresses the Will in a Release clause that is sufficiently specific. There is Ontario legislation that stipulates how Will provisions can be revoked (namely the Succession Law Reform Act), and decided court cases that consider the requirements (Makarchuk v. Makarchuk, 2011 ONSC 4633 citing Robinson v. Morrell Estate  N.S.J. No. 597 (N.S.C.A.)).