public static void AddForeignKey(this IQuery query, ObjectName tableName, string constraintName, string[] columnNames, ObjectName foreignTableName, string[] foreignColumns, ForeignKeyAction onDelete, ForeignKeyAction onUpdate) { query.AddConstraint(tableName, SqlTableConstraint.ForeignKey(constraintName, columnNames, foreignTableName.FullName, foreignColumns, onDelete, onUpdate)); }
private void RunQuery(object sender, System.Windows.RoutedEventArgs e) { IQuery query = NewQuery(); query.AddConstraint("_firstName", FirstName.Text); query.AddConstraint("_lastName", LastName.Text); IObjectSet enumerable = query.Execute(); foreach (Person person in enumerable) { System.Diagnostics.Debug.WriteLine(person.FirstName + " " + person.LastName); } People.ItemsSource = enumerable; }
public static void AddUniqueKey(this IQuery query, ObjectName tableName, string constraintName, params string[] columnNames) { query.AddConstraint(tableName, SqlTableConstraint.UniqueKey(constraintName, columnNames)); }
public static void AddCheck(this IQuery query, ObjectName tableName, string constraintName, SqlExpression checkExpression) { query.AddConstraint(tableName, SqlTableConstraint.Check(constraintName, checkExpression)); }