public static void RemoveTwitterAccount(string accountName) { SYMData db = new SYMData(ConfigurationHelper.Instance.DBConnectionString); TwitterAccounts toDelete = db.TwitterAccounts.Single(account => account.AccountName == accountName); db.TwitterAccounts.DeleteOnSubmit(toDelete); db.SubmitChanges(); }
public static void AddTwitterAccount(string accountName, string accessTokenString, string verificationString) { SYMData db = new SYMData(ConfigurationHelper.Instance.DBConnectionString); TwitterAccounts account = new TwitterAccounts(); account.AccountName = accountName; account.AccessToken = accessTokenString; account.VerificationString = verificationString; db.TwitterAccounts.InsertOnSubmit(account); db.SubmitChanges(); }