/// <summary> /// Determines whether specified change should be included in rendering based on specified options. /// </summary> /// <param name="change"></param> /// <param name="options"></param> /// <returns></returns> private static bool FilterChange(RelationalModelChange change, RenderOptions options) { if (options.SuppressForeignKeys) { if (change is AddForeignKeyChange || change is DropForeignKeyChange) { return(false); } } if (options.SuppressIndexes) { if (change is AddIndexChange || change is DropIndexChange) { return(false); } } if (options.SuppressUniqueConstraints) { if (change is AddUniqueConstraintChange || change is DropUniqueConstraintChange) { return(false); } } if (options.SuppressPrimaryKeys) { if (change is AddPrimaryKeyChange || change is DropPrimaryKeyChange) { return(false); } } return(true); }
/// <summary> /// Determines whether specified change should be included in rendering based on specified options. /// </summary> /// <param name="change"></param> /// <param name="options"></param> /// <returns></returns> private static bool FilterChange(RelationalModelChange change, RenderOptions options) { if (options.SuppressForeignKeys) { if (change is AddForeignKeyChange || change is DropForeignKeyChange) return false; } if (options.SuppressIndexes) { if (change is AddIndexChange || change is DropIndexChange) return false; } if (options.SuppressUniqueConstraints) { if (change is AddUniqueConstraintChange || change is DropUniqueConstraintChange) return false; } if (options.SuppressPrimaryKeys) { if (change is AddPrimaryKeyChange || change is DropPrimaryKeyChange) return false; } return true; }