private void initializeDBConnection() { var connection = SettingsFile.Default.ConnectionString; DbContextOptionsBuilder <COMP4952PROJECTContext> builder = new DbContextOptionsBuilder <COMP4952PROJECTContext>(); builder.UseSqlServer(connection); db = new COMP4952PROJECTContext(builder.Options); }