No, mandatory background checks have not prevented the Washington Navy Yard shootings, because people who are intent on doing harm will find a way to do it. There is no way to prevent all of the violence in the world. Someone who wants to get their hands on weapons will find a way. The Washington Navy Yard shooting was not an exception.
I do not believe that mandatory background checks could have prevented the shooting at the Navy Yard and I am of the opinion that if an individual desires to commit a mass shooting that there is nothing that can be done to stop them as long as there are guns available to be used to kill people.