public static bool AddNewSuggestion(string username, string text) { DatabaseDataContext db = new DatabaseDataContext(ConnectionString); SuggestionTable suggestion = new SuggestionTable() { Suggestion = text, Username = username }; db.SuggestionTables.InsertOnSubmit(suggestion); db.SubmitChanges(); return db.SuggestionTables.Contains(suggestion); }
public static bool AddNewSuggestion(string username, string text) { DatabaseDataContext db = new DatabaseDataContext(ConnectionString); SuggestionTable suggestion = new SuggestionTable() { Suggestion = text, Username = username }; db.SuggestionTables.InsertOnSubmit(suggestion); db.SubmitChanges(); return(db.SuggestionTables.Contains(suggestion)); }
partial void DeleteSuggestionTable(SuggestionTable instance);
partial void UpdateSuggestionTable(SuggestionTable instance);
partial void InsertSuggestionTable(SuggestionTable instance);