FTP, name this comedic opera by Richard Wagner set in the mid-16th-century in Nuremberg.
It opens in the church of St. Katherine with the chorale "Da zur dir der Heiland" bringing the services to a close.  In the second act, its villain Beckmesser, mistaking Magdalena for the heroine, serenades her only to be soundly thrashed by Magdalena's admirer, David.  Before this opera begins we hear the orchestral prelude, which contains five major themes from it including the "Prize Song," which follows the "Dance of the Apprentices" in the opera proper.  All ends happily, with Eva going to the winner of the song contest, Walther von Stolzing, who now becomes one of the title characters, like Hans Sachs.  FTP, name this comedic opera by Richard Wagner set in the mid-16th-century in Nuremberg.
It opens in the church of St. Katherine with the chorale "Da zur dir
Die Mestersinger von Nurenberg or The Mastersingers of Nuremberg