Just Say No to the Server Side Object Model
https://www.instagram.com/p/Bds1MKEn_pi/
Repeat after me: Thou Shalt Not Develop with the SharePoint Server Side Object Model.
Unless…. You are an Admin or DevOps, and you’re scripting with PowerShell for your on-premise SharePoint Server farm.
There are no other common scenarios where server side code is acceptable.
No Web Parts.
No Event Receivers.
No Full Trust Workflows.
No Sandbox Code.
No Delegate Controls.
No Field Controls.
No User Controls.
No Service Applications.
And definitely no Timer Jobs.