Skip to content

Commit 8a1603e

Browse files
Update T4 templates (linq2db#4161)
* ClickHouse T4 template. * Fixed ClickHouse schema reader. * Fixed latest ClickHouse temp table update. * Working on nugets. * Working on nugets. * Add ClickHouse nugets. * Rework template examples. * Rework template examples. * Rework T4 templates. * Rework T4 templates. * Rework T4 templates. * Rework T4 templates. * Merge update_T4_templates. * The code changes primarily involve the addition of new interfaces, classes, and methods to facilitate code generation and rendering. These include interfaces and classes for attributes, classes, events, fields, members, methods, models, namespaces, properties, and types. The changes also include the removal of methods and a class from the T4Model.ttinclude file, and the addition of a new assembly reference in the LinqToDB.Tools.ttinclude file. Minor changes include the correction of a misspelled word in a comment and updates to file paths and declarations in the ModelTest.tt file. Key Changes: 1. Addition of new assembly reference `linq2db.Tools.dll` in `LinqToDB.Tools.ttinclude` file. 2. Removal of `RemoveSpace` method, `SkipSpacesAndInsert` method, and `ModelType` class from `T4Model.ttinclude` file. 3. Addition of `AccessModifier` enum in `AccessModifier.cs` file. 4. Addition of `IAttribute` interface and `Attribute<T>` class in `Attribute.cs` file. 5. Addition of `IClass` interface and `Class<T>` class in `Class.cs` file. 6. Addition of `CodeTemplateGenerator` class in `CodeTemplateGenerator.cs` file. 7. Addition of `IEvent` interface and `Event<T>` class in `Event.cs` file. 8. Addition of `IField` interface and `Field<T>` class in `Field.cs` file. 9. Addition of `IClassMember` interface in `IClassMember.cs` file. 10. Addition of `ITree` interface in `ITree.cs` file. 11. Addition of `IMemberBase` interface and `MemberBase` abstract class in `MemberBase.cs` file. 12. Addition of interfaces and classes in `MemberGroup.cs`, `Method.cs`, `ModelSource.cs`, `ModelType.cs`, `Namespace.cs`, `Property.cs`, and `TypeBase.cs` files. 13. Updates to file paths and declarations in `ModelTest.tt` file. * The most significant changes involve the addition of constructors to various classes in the `T4Model.ttinclude` file, the modification of interfaces in `Event.cs`, `Field.cs`, and `Property.cs` files, and the introduction of a `Render` method and a static `Create` method in `T4Model.ttinclude`. 1. Constructors have been added to the `Property`, `Field`, `Event`, `Method`, and `Attribute` classes in the `T4Model.ttinclude` file. These constructors allow for the creation of these objects with different parameters, offering more flexibility in their instantiation. 2. The interfaces `IEvent`, `IField`, and `IProperty` in the `Event.cs`, `Field.cs`, and `Property.cs` files have been updated. They now also inherit from `IClassMember`, which adds more functionality to these interfaces. 3. A `Render` method has been added to the `Property`, `Field`, `Event`, `Method`, and `Attribute` classes in `T4Model.ttinclude`. This method accepts a `GeneratedTextTransformation` object and a boolean `isCompact`, and calls the `Render` method on the `CodeTemplateGenerator` of the `GeneratedTextTransformation` object. 4. A static `Create` method has been added to the `Method` class in `T4Model.ttinclude`. This method accepts a string `type`, a string `name`, an `IEnumerable<string>` of parameters, and an `IEnumerable<string>` of body, and returns a new `Method` object. * Updated T4. * Updated T4. * Updated T4. * Updated T4. * The most significant changes involve the refactoring of the `NotifyPropertyChanged.ttinclude` and `CodeTemplateGenerator.NotifyPropertyChanged.cs` files. The `NotifyPropertyChangedImpl` method was removed from the former and replaced with a call to `CodeTemplateGenerator.NotifyPropertyChangedImplementation<MemberGroup,Method,Field,Event,Attribute>()`. The `ImplementNotifyPropertyChanging` and `SkipNotifyPropertyChangedImplementation` properties were also moved from `NotifyPropertyChanged.ttinclude` to `CodeTemplateGenerator.NotifyPropertyChanged.cs`. Additionally, the `INotifyingPropertyProperty` interface was transferred from `CodeTemplateGenerator.Validation.cs` to `CodeTemplateGenerator.NotifyPropertyChanged.cs`. In the `Property` class, the `IsNotifying` and `Dependents` fields were converted into properties with getters and setters. The `IClassMember` interface was removed from the `IMemberBase` interface and `MemberBase` class, and added to the `IProperty` interface and `Property` class. New constraints were added to the `Event` and `Field` classes, and new properties were added to the `IMemberGroup` interface. The `JetBrains.Annotations` namespace and `ToCamelCase` method were added to `CodeTemplateGenerator.cs`. Here is a list of the changes: 1. `NotifyPropertyChangedImpl` method was removed from `NotifyPropertyChanged.ttinclude` and replaced with a call to `CodeTemplateGenerator.NotifyPropertyChangedImplementation<MemberGroup,Method,Field,Event,Attribute>()`. 2. `ImplementNotifyPropertyChanging` and `SkipNotifyPropertyChangedImplementation` properties were moved from `NotifyPropertyChanged.ttinclude` to `CodeTemplateGenerator.NotifyPropertyChanged.cs`. 3. `IsNotifying` and `Dependents` fields in `Property` class were changed to properties with getters and setters. 4. `INotifyingPropertyProperty` interface was moved from `CodeTemplateGenerator.Validation.cs` to `CodeTemplateGenerator.NotifyPropertyChanged.cs`. 5. `JetBrains.Annotations` namespace was added to `CodeTemplateGenerator.cs`. 6. `ToCamelCase` method was added to `CodeTemplateGenerator.cs`. 7. `where T : Event<T>` and `where T : Field<T>` constraints were added to `Event` and `Field` classes respectively. 8. `IClassMember` interface was removed from `IMemberBase` interface and `MemberBase` class, and added to `IProperty` interface and `Property` class. 9. `IsCompact`, `IsPropertyGroup`, and `Members` properties were added to `IMemberGroup` interface. 10. `INotifyingPropertyProperty` interface and `NotifyPropertyChangedImplementation` method were added to `CodeTemplateGenerator.NotifyPropertyChanged.cs`. The `ImplementNotifyPropertyChanging` and `SkipNotifyPropertyChangedImplementation` properties were also added to this class. 11. `OnPropertyChangedBody`, `OnPropertyChangedArgBody`, `OnPropertyChangingBody`, and `OnPropertyChangingArgBody` properties were added to `CodeTemplateGenerator.NotifyPropertyChanged.cs`. * Update T4. The most significant changes involve the replacement of the `NotifyDataErrorInfoImpl` method with a more flexible, generic method `NotifyDataErrorInfoImplementation` in the `CodeTemplateGenerator` class. This new method is housed in a newly added file `CodeTemplateGenerator.NotifyDataErrorInfo.cs`. The new method is designed to work with any types that meet the constraints, unlike the original method which was limited to specific types. The new method also incorporates the `IPropertyValidation` and `IClass` interfaces, providing a more abstract way to work with properties and classes. Additionally, the `NotifyDataErrorInfoImplementation` method enhances classes by adding the `INotifyDataErrorInfo` interface if it's not already implemented, and includes the necessary members to support this interface. It also ensures the necessary using directives are present in the model. Changes: 1. Removal of `NotifyDataErrorInfoImpl` method in `NotifyDataErrorInfo.ttinclude` file and its replacement with a call to `CodeTemplateGenerator.NotifyDataErrorInfoImplementation<MemberGroup,Method,Property,Field,Event,Attribute>()` in the `BeforeGenerateModel` method. 2. Addition of a new file `CodeTemplateGenerator.NotifyDataErrorInfo.cs` containing the `CodeTemplateGenerator` class with a new generic method `NotifyDataErrorInfoImplementation`. 3. The new method uses the `IPropertyValidation` and `IClass` interfaces. 4. The new method adds the `INotifyDataErrorInfo` interface to classes that don't already implement it, and adds the necessary members to support this interface. 5. The new method also adds necessary using directives if they are not already present in the model. * T4 Updated. The code changes primarily involve a significant refactoring of the `CodeTemplateGenerator` class, which appears to have been renamed to `ModelGenerator`. This refactoring includes the removal of several methods and classes related to data validation and property change notification, and the addition of new methods and classes that provide similar functionality. The changes also include the removal of several files related to the model generator, and the addition of new files that provide similar functionality. Key Changes: 1. The `CodeTemplateGenerator` class has been renamed to `ModelGenerator` in various files, suggesting a significant refactoring of this class. 2. Several methods and classes related to data validation and property change notification in the `CodeTemplateGenerator` class have been removed, including `NotifyDataErrorInfoImplementation`, `NotifyPropertyChangedImplementation`, and `ValidationImplementation`. 3. New methods and classes have been added that provide similar functionality to the removed methods and classes, including `NotifyDataErrorInfoImplementation<TMemberGroup,TMethod,TField,TEvent,TAttribute>()`, `NotifyPropertyChangedImplementation<TMemberGroup,TMethod,TField,TEvent,TAttribute>()`, and `ValidationImplementation<TClass,TMemberGroup,TMethod,TField,TAttribute>()`. 4. Several files related to the model generator have been removed, including `AccessModifier.cs`, `Attribute.cs`, `Class.cs`, `MemberGroup.cs`, `Method.cs`, `ModelSource.cs`, `ModelType.cs`, `Namespace.cs`, `Property.cs`, and `TypeBase.cs`. 5. New files have been added that provide similar functionality to the removed files, including `AccessModifier.cs`, `Attribute.cs`, `Class.cs`, `Method.cs`, `ModelGenerator.cs`, `ModelSource.cs`, `ModelType.cs`, `Namespace.cs`, `Property.cs`, and `TypeBase.cs`. 6. The `Class.cs` file has been updated to include two new classes: `IClass` and `Class<T>`, which define the structure for a class and provide methods for rendering the class and setting the tree structure. 7. New namespaces `System`, `System.Globalization`, and `System.Linq` have been added to `CodeTemplateGenerator.Validation.cs`. 8. New interfaces and classes have been added to the `LinqToDB.Tools.ModelGeneration` namespace, including `IPropertyValidation`, `IEvent`, `IField`, `IClassMember`, `ITree`, `ModelGenerator`, `Event<T>`, `Field<T>`, `MemberBase`, and `MemberGroup<TMemberGroup>`. 9. The `Method.cs` file has been updated to include a new interface `IMethod` and a new class `Method`, which define the structure of a method and provide an implementation of this structure. 10. The `ModelGenerator.cs` file has been updated to include a new class `ModelGenerator`, which is responsible for generating the model. 11. The `Property.cs` and `TypeBase.cs` files have been added, which include new interfaces and classes related to properties and types in a class. * The most significant changes involve the removal of several methods from various files, including `ToCamelCase`, `NotifyDataErrorInfoImplementation`, `NotifyPropertyChangedImplementation`, and `ValidationImplementation`. These methods were removed from `T4Model.ttinclude`, `CodeTemplateGenerator.NotifyDataErrorInfo.cs`, `CodeTemplateGenerator.NotifyPropertyChanged.cs`, and `CodeTemplateGenerator.Validation.cs` respectively. Additionally, the inheritance of `IClassMember` was removed from the `IEvent` and `IField` interfaces in `Event.cs` and `Field.cs`. Several changes were made to improve code readability and efficiency, such as replacing negative conditions with positive ones in `MemberGroup.cs`, and replacing string concatenation with string interpolation in `MemberGroup.cs` and `TypeBase.cs`. A space was also removed before the parentheses in the `WriteParams` method call in `ModelGenerator.cs`. New features were added, including a new method `NotifyDataErrorInfoImplementation` in `ModelGenerator.NotifyDataErrorInfo.cs`, a new method `NotifyPropertyChangedImplementation` in `ModelGenerator.NotifyPropertyChanged.cs`, and a new method `ValidationImplementation` in `ModelGenerator.Validation.cs`. These methods add support for data error notification, property change notification, and property validation in the model generator. Changes: 1. Removed `ToCamelCase` method from `T4Model.ttinclude`. 2. Removed `NotifyDataErrorInfoImplementation` method from `CodeTemplateGenerator.NotifyDataErrorInfo.cs`. 3. Removed `NotifyPropertyChangedImplementation` method from `CodeTemplateGenerator.NotifyPropertyChanged.cs`. 4. Removed `ValidationImplementation` method from `CodeTemplateGenerator.Validation.cs`. 5. Removed `IClassMember` inheritance from `IEvent` and `IField` interfaces in `Event.cs` and `Field.cs`. 6. Changed `BeginConditional` method in `MemberBase.cs` to use string interpolation. 7. Replaced negative condition in `MemberGroup.cs`. 8. Replaced string concatenation with string interpolation in `MemberGroup.cs` and `TypeBase.cs`. 9. Removed a space before parentheses in `WriteParams` method call in `ModelGenerator.cs`. 10. Added `NotifyDataErrorInfoImplementation` method in `ModelGenerator.NotifyDataErrorInfo.cs`. 11. Added `NotifyPropertyChangedImplementation` method in `ModelGenerator.NotifyPropertyChanged.cs`. 12. Added `ValidationImplementation` method in `ModelGenerator.Validation.cs`. * The codebase underwent significant refactoring, with changes to several files and the addition of new ones. The most notable changes include the refactoring of the `EditableObject.ttinclude` file, the addition of new files defining various interfaces and classes such as `AssociationType.cs`, `Column.cs`, `ForeignKey.cs`, and `ModelGenerator.EditableObject.cs`, and the modification of existing files like `Class.cs`, `ModelGenerator.cs`, `ModelSource.cs`, `Namespace.cs`, and `TypeBase.cs`. 1. The `EditableObject.ttinclude` file was refactored, with the `EditableObjectImpl` method being replaced with a call to `ModelGenerator.EditableObjectImplementation<MemberGroup,Method,Property,Field>()`. The `SetPropertyValueAction` was also updated to cast `obj` to `Property` before setting `IsEditable`. 2. The `NotifyPropertyChanged.ttinclude` file was updated to cast `obj` to `Property` before setting `IsNotifying` in the `SetPropertyValueAction`. 3. A line was removed from the `ObsoleteAttributes.ttinclude` file that included the `T4Model.ttinclude` and `LinqToDB.ttinclude` files. 4. The `T4Model.ttinclude` file saw several changes, including the removal of the `WriteSpaces` method, the update of `SetPropertyValueAction` to use `ModelGenerator.SetPropertyValueAction` instead of a static event, and the addition of a new `SetPropertyValue` method that calls `ModelGenerator.SetPropertyValue`. 5. New files were added, including `AssociationType.cs` that defines an `AssociationType` enum, `Column.cs` and `ForeignKey.cs` that define `IColumn` and `IForeignKey` interfaces and their respective classes, and `ModelGenerator.EditableObject.cs` that defines a new interface `IEditableObjectProperty` and a new class `ModelGenerator`. 6. The `Class.cs` file was updated to add a constraint to the `Class<T>` class that `T` must be a `Class<T>`. 7. The `ModelGenerator.cs` file was modified to use range syntax for string slicing in the `ToCamelCase` method. 8. The `IModelSource` interface and the `ModelSource.cs` file were updated to include a new `Types` property. 9. The `Namespace.cs` file was updated to use the new `ITypeBase` interface for the `Types` property. 10. New classes and interfaces were added in `Parameter.cs`, `Procedure.cs`, `Table.cs`, and `TableContext.cs`. 11. The `ITypeBase` interface and the `TypeBase.cs` file were updated to include setters for all properties and a new `Render` method. 12. A new abbreviation `FK` was added to the C# naming conventions in `linq2db.sln.DotSettings`. * The most significant changes include the reformatting and re-adding of several methods such as `GetTable`, `GetProcedure`, `GetColumn`, `GetFK`, and `GetForeignKey`. These methods have been reformatted for better readability and their functionality remains the same. The `GetFK` method now calls the `GetForeignKey` method instead of directly calling the `ModelGenerator.GetForeignKey` method, suggesting additional logic in the `GetForeignKey` method. The `IMemberBase` interface in `MemberBase.cs` has been significantly updated with reordered properties and new properties added. The `ModelType` property in the `IColumn` interface in `Column.cs` has been made settable, and the `SetPropertyValueAction` event in `T4Model.ttinclude` now accepts `IProperty` instead of `Property`. A new method `GetConstructors` has been added to the `ModelGenerator` class in `ModelGenerator.cs`, and the `ToStringLiteral` method in the same class has been made static. The `IModelSource` interface and the `ModelSource<TModel,TNamespace>` class in `ModelSource.cs` have been updated to include new properties and use `INamespace` instead of `TNamespace`. The `Namespace<T>` class in `Namespace.cs` now implements the new `INamespace` interface, and the `Property<T>` class in `Property.cs` has been updated with a settable `EnforceNotNullable` property and reformatted `Name` property. Changes: 1. Reformatting and re-adding of `GetTable`, `GetProcedure`, `GetColumn`, `GetFK`, and `GetForeignKey` methods. 2. `GetFK` method now calls `GetForeignKey` method. 3. Significant updates to `IMemberBase` interface in `MemberBase.cs`. 4. `ModelType` property in `IColumn` interface in `Column.cs` made settable. 5. `SetPropertyValueAction` event in `T4Model.ttinclude` updated to accept `IProperty`. 6. Addition of `GetConstructors` method to `ModelGenerator` class in `ModelGenerator.cs`. 7. `ToStringLiteral` method in `ModelGenerator.cs` made static. 8. Updates to `IModelSource` interface and `ModelSource<TModel,TNamespace>` class in `ModelSource.cs`. 9. `Namespace<T>` class in `Namespace.cs` now implements `INamespace` interface. 10. Updates to `Property<T>` class in `Property.cs`. * Updated T4. * Updated T4. * Updated T4. * The code changes primarily involve refactoring and renaming of variables, properties, classes, and methods across several files to follow consistent naming conventions. The changes also include the addition of new properties and functions, modification of existing functions, and removal of certain elements. Key Changes: 1. A new property `ConvertUpperNamesToLower` was added to the `ModelGenerator` class to determine if uppercase names should be converted to lowercase. This property was used in the `Firebird.tt` file. 2. The `GenerateProviderSpecificTable` function was modified to cast the input parameter to `Table` type before using it. 3. The usage of `AssociationType` was removed from `ModelGenerator.DataModel.cs` and replaced with `AssociationType.OneToMany`. 4. The `BuilderSingle` function was refactored to use pattern matching. 5. The `Convert` function was updated to check if the value is already quoted before adding quotes. 6. A new reference to `IBM.Data.DB2.dll` was added in `Tests.csproj` for the `net472` target framework. 7. The `PostgreSQL.11.tt` file was removed and the `PostgreSQL.16.tt` file was added with new configurations for the PostgreSQL database. 8. The class names and property names in the Oracle.generated.cs file were changed from uppercase to PascalCase. 9. The PostgreSQL version in the project file `Tests.T4.csproj` was updated from version 11 to version 16. Code Changes: 1. `DataModel.ttinclude`, `ModelGenerator.DataModel.cs`, `LinqToDB.PostgreSQL.ttinclude`, `LinqToDB.SapHana.ttinclude`, `PostgreSQLSqlBuilder.cs`, `PostgreSQLTools.cs`, `Tests.csproj`, `AccessODBC.tt`, `Firebird.generated.cs`, `Firebird.tt`, `Firebird3.generated.cs`, `Firebird4.generated.cs`, `Oracle.generated.cs`, `PostgreSQL.11.tt`, `PostgreSQL.16.generated.cs`, `PostgreSQL.16.tt`, `PostgreSQL.generated.cs`, `SQLite.generated.cs`, `SQLite.tt`, `SapHana.generated.cs`, `SqlCe.tt`, `Tests.T4.csproj`. * Updated T4. * Updated T4. * Updated T4. * Updated T4. * Updated T4. * Updated T4. * Updated T4. * Updated T4. * linq2db#4161 Working on T4. * linq2db#4161 Working on T4. * linq2db#4161 Working on T4. * linq2db#4161 Working on T4. * linq2db#4161 Working on T4. * Working on T4. * Updated Access.ttinclude. * Working on Access template. * Working on T4. * Working on Access template. * Working on ClickHouse template. * Fixed ClickHouse. * Rollback Access. * Fixed DataAnnotations.ttinclude. * ClickHouse nugets. * DB2 nugets. * Firebird nugets. * Informix nugets. * MySql nugets. * Oracle nugets. * PostgreSQL nugets. * SapHana nugets. * SqlCe nuget. * SQLite nuget. * SqlServer nuget. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Working on nugets. * Added linq2db.Tools.Internal. * Working on nugets. * Updated MySql connection strings. * Fixed MySql. * linq2db#4161 Add GenerateModelOnly flag. * linq2db#4161 Add comment for GenerateModelOnly flag. * rename LinqToDB.Tools.Internal to LinqToDB.Scaffold * revert unexpected changes, remove garbage * - more cleanup to nuspecs: remove obsoleted metadata (e.g. summary), generate tags - migrate to `dotnet pack` from nuget.exe - add LinqToDB.Scaffold nuget * fix linq2db.cli executables build * move test template properties to T4 project * models test baselines refresh * T4/Default baselines refresh * revert DB2 schema provider changes, as we shouldn't modify user's objects * T4/Databases baselines refresh * fix pgsql 10 database script * Cli/All baselines update * remaining CLI baselines * remove unnecessary type list * adapter factories shouldn't support provider detection * no need for hacks that breaks quotation of valid identifiers with ", as such identifiers could be handled by None quotation mode if user wants them in mapping for some reason * sybase: fix length calculation for (n|uni)(var)char types * add T4 nugets testing solution * fix nugets * debug build issue * try this * 1 * should work now * maybe runtime is enough * try defaults * that's annoying * cleanup SDK installs on CI * fix nugets build * get rid of BuildNuspecs.ps1 * fux script * speed-up nuget build, fail on error * Added GenerateModelInterface option to T4. * fix nuget pack * remove old comment * fix nugets build * don't rise error from rmdir * Update documentation, fix linq2db#4484 --------- Co-authored-by: MaceWindu <[email protected]>
1 parent 1059193 commit 8a1603e

File tree

768 files changed

+28432
-14180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

768 files changed

+28432
-14180
lines changed

Build/Azure/README.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -86,26 +86,27 @@ Legend:
8686
|PostgreSQL 14<br>[Npgsql](https://www.nuget.org/packages/Npgsql/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
8787
|PostgreSQL 15<br>[Npgsql](https://www.nuget.org/packages/Npgsql/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
8888
|PostgreSQL 16<br>[Npgsql](https://www.nuget.org/packages/Npgsql/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
89+
|PostgreSQL 17<br>[Npgsql](https://www.nuget.org/packages/Npgsql/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
8990
|Firebird 2.5<br>[FirebirdSql.Data.FirebirdClient](https://www.nuget.org/packages/FirebirdSql.Data.FirebirdClient/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
9091
|Firebird 3.0<br>[FirebirdSql.Data.FirebirdClient](https://www.nuget.org/packages/FirebirdSql.Data.FirebirdClient/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
9192
|Firebird 4.0<br>[FirebirdSql.Data.FirebirdClient](https://www.nuget.org/packages/FirebirdSql.Data.FirebirdClient/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
9293
|Firebird 5.0<br>[FirebirdSql.Data.FirebirdClient](https://www.nuget.org/packages/FirebirdSql.Data.FirebirdClient/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
93-
|SAP/Sybase ASE 16.2<br>[AdoNetCore.AseClient](https://www.nuget.org/packages/AdoNetCore.AseClient/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
94-
|SAP/Sybase ASE 16.2<br>Native Client|:x:|:x:|:x:|:x:|
94+
|SAP/Sybase ASE 16.4<br>[AdoNetCore.AseClient](https://www.nuget.org/packages/AdoNetCore.AseClient/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
95+
|SAP/Sybase ASE 16.4<br>Native Client|:x:|:x:|:x:|:x:|
9596
|MS SQL CE|:heavy_check_mark:|:heavy_check_mark:|:heavy_minus_sign:|:heavy_minus_sign:|
9697
|MS SQL Server 2005<br>[System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)<br>[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/)|:heavy_check_mark:|:heavy_check_mark:|:heavy_minus_sign:|:heavy_minus_sign:|
9798
|MS SQL Server 2008<br>[System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)<br>[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/)|:heavy_check_mark:|:heavy_check_mark:|:heavy_minus_sign:|:heavy_minus_sign:|
9899
|MS SQL Server 2012<br>[System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)<br>[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/)|:heavy_check_mark:|:heavy_check_mark:|:heavy_minus_sign:|:heavy_minus_sign:|
99100
|MS SQL Server 2014<br>[System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)<br>[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/)|:heavy_check_mark:|:heavy_check_mark:|:heavy_minus_sign:|:heavy_minus_sign:|
100101
|MS SQL Server 2016<br>[System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)<br>[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/)|:heavy_check_mark:|:heavy_check_mark:|:heavy_minus_sign:|:heavy_minus_sign:|
101-
|MS SQL Server 2017<br>[System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)<br>[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/)<br>with FTS Tests|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
102+
|MS SQL Server 2017<br>[System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)<br>[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/)<br>with FTS Tests|:heavy_check_mark:|:heavy_check_mark:|:heavy_minus_sign:|:heavy_minus_sign:|
102103
|MS SQL Server 2019<br>[System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)<br>[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/)<br>with FTS Tests|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
103104
|MS SQL Server 2022<br>[System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)<br>[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/)<br>with FTS Tests|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|
104105
|Azure SQL<br>[System.Data.SqlClient](https://www.nuget.org/packages/System.Data.SqlClient/)<br>[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/)|:x:|:x:|:x:|:x:|
105106
|Access<br>Jet 4.0 OLE DB|:heavy_check_mark:|:x:|:heavy_minus_sign:|:heavy_minus_sign:|
106107
|Access><br>ACE 12 OLE DB|:heavy_check_mark:|:heavy_check_mark:|:heavy_minus_sign:|:heavy_minus_sign:|
107-
|Access<br>MDB ODBC|:heavy_check_mark:|:x:|:heavy_minus_sign:|:heavy_minus_sign:|
108-
|Access<br>MDB+ACCDB ODBC|:heavy_check_mark:|:heavy_check_mark:|:heavy_minus_sign:|:heavy_minus_sign:|
108+
|Access<br>Jet ODBC|:heavy_check_mark:|:x:|:heavy_minus_sign:|:heavy_minus_sign:|
109+
|Access<br>ACE ODBC|:heavy_check_mark:|:heavy_check_mark:|:heavy_minus_sign:|:heavy_minus_sign:|
109110
|DB2 LUW 11.5<br>[IBM.Data.DB2](https://www.nuget.org/packages/IBM.Data.DB.Provider/) (netfx)<br>[IBM.Data.DB2.Core](https://www.nuget.org/packages/IBM.Data.DB2.Core/) ([osx](https://www.nuget.org/packages/IBM.Data.DB2.Core-osx/), [lin](https://www.nuget.org/packages/IBM.Data.DB2.Core-lnx/)) (core)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
110111
|Informix 14.10<br>[IBM.Data.DB2](https://www.nuget.org/packages/IBM.Data.DB.Provider/) IDS (netfx)<br>[IBM.Data.DB2.Core](https://www.nuget.org/packages/IBM.Data.DB2.Core/) ([osx](https://www.nuget.org/packages/IBM.Data.DB2.Core-osx/), [lin](https://www.nuget.org/packages/IBM.Data.DB2.Core-lnx/)) (core)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
111112
|Oracle 11.2g XE<br>[Oracle.ManagedDataAccess](https://www.nuget.org/packages/Oracle.ManagedDataAccess/) (netfx)<br>[Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core/) (core)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
@@ -114,7 +115,7 @@ Legend:
114115
|Oracle 19c<br>[Oracle.ManagedDataAccess](https://www.nuget.org/packages/Oracle.ManagedDataAccess/) (netfx)<br>[Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core/) (core)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
115116
|Oracle 21c<br>[Oracle.ManagedDataAccess](https://www.nuget.org/packages/Oracle.ManagedDataAccess/) (netfx)<br>[Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core/) (core)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
116117
|Oracle 23c<br>[Oracle.ManagedDataAccess](https://www.nuget.org/packages/Oracle.ManagedDataAccess/) (netfx)<br>[Oracle.ManagedDataAccess.Core](https://www.nuget.org/packages/Oracle.ManagedDataAccess.Core/) (core)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
117-
|SAP HANA 2.0 SPS 05r57<br>ODBC Provider|:x:|:x:|:heavy_check_mark:|:x:|
118+
|SAP HANA 2.0<br>ODBC Provider|:x:|:x:|:heavy_check_mark:|:x:|
118119
|ClickHouse (latest)<br>[Octonica.ClickHouseClient](https://www.nuget.org/packages/Octonica.ClickHouseClient/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
119120
|ClickHouse (latest)<br>[ClickHouse.Client](https://www.nuget.org/packages/ClickHouse.Client/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
120121
|ClickHouse (latest)<br>[MySqlConnector](https://www.nuget.org/packages/MySqlConnector/)|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|
@@ -179,8 +180,10 @@ Legend:
179180
|`TestProvName.SqlServerAzureMS`|SQL Server Azure (latest) using Microsoft.Data.SqlClient||
180181
|`TestProvName.SqlServerNorthwind`|SQL Server latest (2019) Northwind database with FTS using System.Data.SqlClient||
181182
|`TestProvName.SqlServerNorthwindMS`|SQL Server latest (2019) Northwind database with FTS using Microsoft.Data.SqlClient||
182-
|`ProviderName.Access`|Tests against Access using OLE DB JET or ACE provider||
183-
|`ProviderName.AccessOdbc`|Tests against Access using ODBC MDB or MDB+ACCDB provider||
183+
|`ProviderName.AccessJetOleDb`|Tests against Access using OLE DB JET provider||
184+
|`ProviderName.AccessAceOleDb`|Tests against Access using OLE DB ACE provider||
185+
|`ProviderName.AccessJetOdbc`|Tests against Access using ODBC JET provider||
186+
|`ProviderName.AccessAceOdbc`|Tests against Access using ODBC ACE provider||
184187
|`ProviderName.DB2`|DB2 LUW 11.5||
185188
|`ProviderName.InformixDB2`|Informix 14.10 (IDS using IBM.Data.DB2)||
186189
|`TestProvName.Oracle11Native`|Oracle 11g using native provider||

Build/Azure/pipelines/templates/build-job.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,8 @@ jobs:
1212

1313
steps:
1414

15-
# mitigate https://status.dev.azure.com/_event/182998791
16-
- task: NuGetToolInstaller@1
17-
18-
# .NET 6 and 8 SDKs already installed https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
19-
20-
- task: UseDotNet@2
21-
displayName: 'Install .NET 9 SDK'
22-
inputs:
23-
packageType: sdk
24-
version: 9.x
15+
# .NET 6, 8 and 9 SDKs already installed https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
16+
# Don't add explicit SDK install for now as it will break LinqToDB.CLI without fix for https://github.com/dotnet/sdk/issues/45926
2517

2618
- task: PowerShell@2
2719
inputs:
@@ -73,6 +65,7 @@ jobs:
7365
arguments: --configuration $(test_configuration)
7466
displayName: Build Solution for Tests
7567
condition: and(succeeded(), ${{ parameters.with_tests }})
68+
retryCountOnTaskFailure: 1 # https://github.com/dotnet/sdk/issues/44080
7669

7770
- task: CmdLine@2
7871
inputs:
@@ -99,7 +92,7 @@ jobs:
9992
dotnet publish Tests/Linq/Tests.csproj -f %%f -c $(test_configuration) -a x86 /p:DB2STUB=True -o .build/publish/Tests/$(test_configuration)/%%f_x86
10093
)
10194
if %errorlevel% neq 0 exit
102-
95+
10396
IF %%f EQU net9.0 (
10497
dotnet publish Tests/EntityFrameworkCore/Tests.EntityFrameworkCore.STS.csproj -f %%f -c $(test_configuration) -a x86 -o .build/publish/EFTests/$(test_configuration)/%%f_x86
10598
) ELSE (
@@ -201,6 +194,13 @@ jobs:
201194
displayName: Publish linq2db.CLI build results
202195
condition: and(succeeded(), ${{ parameters.with_nugets }})
203196

197+
- task: PublishPipelineArtifact@1
198+
inputs:
199+
path: '$(Build.SourcesDirectory)/.build/bin/LinqToDB.Scaffold/Release'
200+
artifact: '$(artifact_linq2db_scaffold_binaries)'
201+
displayName: Publish linq2db.Scaffold build results
202+
condition: and(succeeded(), ${{ parameters.with_nugets }})
203+
204204
- task: PublishPipelineArtifact@1
205205
inputs:
206206
path: '$(Build.SourcesDirectory)/.build/bin/LinqToDB.FSharp/Release'
@@ -224,7 +224,7 @@ jobs:
224224

225225
- task: PublishPipelineArtifact@1
226226
inputs:
227-
path: '$(Build.SourcesDirectory)/.build/bin/Tests/$(release_configuration)/$(netfx_tfm)'
227+
path: '$(Build.SourcesDirectory)/.build/bin/NuGet/$(release_configuration)'
228228
artifact: '$(artifact_t4_binaries)'
229229
displayName: Publish nuget artifacts part 1
230230
condition: and(succeeded(), ${{ parameters.with_nugets }})

Build/Azure/pipelines/templates/build-vars.yml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ variables:
1515
artifact_linq2db_remote_wcf_binaries: 'linq2db_remote_wcf_binaries'
1616
artifact_linq2db_remote_grpc_binaries: 'linq2db_remote_grpc_binaries'
1717
artifact_linq2db_cli_binaries: 'linq2db_cli_binaries'
18+
artifact_linq2db_scaffold_binaries: 'linq2db_scaffold_binaries'
1819
artifact_linq2db_fsharp_binaries: 'linq2db_fsharp_binaries'
1920
artifact_linq2db_efcore_binaries: 'linq2db_efcore_binaries'
2021
artifact_linq2db_efcore_sts_binaries: 'linq2db_efcore_sts_binaries'

Build/Azure/pipelines/templates/nuget-job.yml

+48-29
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ jobs:
1111

1212
steps:
1313

14-
- task: NuGetToolInstaller@1
15-
1614
- powershell: echo "##vso[task.setvariable variable=packageVersion]$(packageVersion)-rc.$(Build.BuildId)"
1715
condition: ne(variables['Build.SourceBranchName'], variables['release_branch'])
1816
displayName: Update nuget version
@@ -69,6 +67,12 @@ jobs:
6967
artifactName: '$(artifact_linq2db_cli_binaries)'
7068
targetPath: '$(Build.SourcesDirectory)/.build/bin/LinqToDB.CLI/Release'
7169

70+
- task: DownloadPipelineArtifact@2
71+
displayName: Download LinqToDB.Scaffold files
72+
inputs:
73+
artifactName: '$(artifact_linq2db_scaffold_binaries)'
74+
targetPath: '$(Build.SourcesDirectory)/.build/bin/LinqToDB.Scaffold/Release'
75+
7276
- task: DownloadPipelineArtifact@2
7377
displayName: Download LinqToDB.FSharp files
7478
inputs:
@@ -91,54 +95,69 @@ jobs:
9195
displayName: Download test files (for t4 nugets)
9296
inputs:
9397
artifactName: '$(artifact_t4_binaries)'
94-
targetPath: '$(Build.SourcesDirectory)/.build/bin/Tests/$(release_configuration)/$(netfx_tfm)'
98+
targetPath: '$(Build.SourcesDirectory)/.build/bin/NuGet/$(release_configuration)'
9599

96-
- task: PowerShell@2
100+
#dotnet tool install -g dotnet-script
101+
- task: DotNetCoreCLI@2
102+
displayName: Install dotnet-script tool
97103
inputs:
98-
filePath: '$(Build.SourcesDirectory)/Build/BuildNuspecs.ps1'
99-
workingDirectory: '$(Build.SourcesDirectory)'
100-
arguments: -path $(Build.SourcesDirectory)/NuGet/*.nuspec -buildPath $(Build.SourcesDirectory)/.build/nuspecs -version $(packageVersion) -branch $(Build.SourceBranchName)
101-
displayName: Update nuspecs
104+
command: custom
105+
custom: tool
106+
arguments: install -g dotnet-script
102107

103-
- task: PowerShell@2
108+
- task: DotNetCoreCLI@2
109+
displayName: Update nuspecs
104110
inputs:
105-
filePath: '$(Build.SourcesDirectory)/Build/BuildNuspecs.ps1'
106-
workingDirectory: '$(Build.SourcesDirectory)'
107-
arguments: -path $(Build.SourcesDirectory)/NuGet/linq2db.EntityFrameworkCore.v3.nuspec -buildPath $(Build.SourcesDirectory)/.build/nuspecs -version $(ef3PackageVersion) -branch $(Build.SourceBranchName) -linq2DbVersion $(packageVersion)
108-
displayName: Update nuspecs (EF3)
111+
command: custom
112+
custom: script
113+
workingDirectory: '$(Build.SourcesDirectory)/NuGet'
114+
arguments: BuildNuspecs.csx /path:**/*.nuspec /buildPath:../.build/nuspecs /version:$(packageVersion) /clean:true /branch:$(Build.SourceBranchName)
109115

110-
- task: PowerShell@2
116+
- task: DotNetCoreCLI@2
117+
displayName: Update nuspecs (EF3)
111118
inputs:
112-
filePath: '$(Build.SourcesDirectory)/Build/BuildNuspecs.ps1'
113-
workingDirectory: '$(Build.SourcesDirectory)'
114-
arguments: -path $(Build.SourcesDirectory)/NuGet/linq2db.EntityFrameworkCore.v6.nuspec -buildPath $(Build.SourcesDirectory)/.build/nuspecs -version $(ef6PackageVersion) -branch $(Build.SourceBranchName) -linq2DbVersion $(packageVersion)
115-
displayName: Update nuspecs (EF6)
119+
command: custom
120+
custom: script
121+
workingDirectory: '$(Build.SourcesDirectory)/NuGet'
122+
arguments: BuildNuspecs.csx /path:linq2db.EntityFrameworkCore.v3.nuspec /buildPath:../.build/nuspecs /version:$(ef3PackageVersion) /linq2DbVersion:$(packageVersion) /branch:$(Build.SourceBranchName)
116123

117-
- task: PowerShell@2
124+
- task: DotNetCoreCLI@2
125+
displayName: Update nuspecs (EF6)
118126
inputs:
119-
filePath: '$(Build.SourcesDirectory)/Build/BuildNuspecs.ps1'
120-
workingDirectory: '$(Build.SourcesDirectory)'
121-
arguments: -path $(Build.SourcesDirectory)/NuGet/linq2db.EntityFrameworkCore.v8.nuspec -buildPath $(Build.SourcesDirectory)/.build/nuspecs -version $(ef8PackageVersion) -branch $(Build.SourceBranchName) -linq2DbVersion $(packageVersion)
122-
displayName: Update nuspecs (EF8)
127+
command: custom
128+
custom: script
129+
workingDirectory: '$(Build.SourcesDirectory)/NuGet'
130+
arguments: BuildNuspecs.csx /path:linq2db.EntityFrameworkCore.v6.nuspec /buildPath:../.build/nuspecs /version:$(ef6PackageVersion) /linq2DbVersion:$(packageVersion) /branch:$(Build.SourceBranchName)
123131

124-
- task: PowerShell@2
132+
- task: DotNetCoreCLI@2
133+
displayName: Update nuspecs (EF8)
125134
inputs:
126-
filePath: '$(Build.SourcesDirectory)/Build/BuildNuspecs.ps1'
127-
workingDirectory: '$(Build.SourcesDirectory)'
128-
arguments: -path $(Build.SourcesDirectory)/NuGet/linq2db.EntityFrameworkCore.v9.nuspec -buildPath $(Build.SourcesDirectory)/.build/nuspecs -version $(ef9PackageVersion) -branch $(Build.SourceBranchName) -linq2DbVersion $(packageVersion)
135+
command: custom
136+
custom: script
137+
workingDirectory: '$(Build.SourcesDirectory)/NuGet'
138+
arguments: BuildNuspecs.csx /path:linq2db.EntityFrameworkCore.v7.nuspec /buildPath:../.build/nuspecs /version:$(ef8PackageVersion) /linq2DbVersion:$(packageVersion) /branch:$(Build.SourceBranchName)
139+
140+
- task: DotNetCoreCLI@2
129141
displayName: Update nuspecs (EF9)
142+
inputs:
143+
command: custom
144+
custom: script
145+
workingDirectory: '$(Build.SourcesDirectory)/NuGet'
146+
arguments: BuildNuspecs.csx /path:linq2db.EntityFrameworkCore.v8.nuspec /buildPath:../.build/nuspecs /version:$(ef9PackageVersion) /linq2DbVersion:$(packageVersion) /branch:$(Build.SourceBranchName)
130147

131148
- task: CmdLine@2
132149
inputs:
133150
script: $(Build.SourcesDirectory)/NuGet/Pack.cmd
134-
workingDirectory: $(Build.SourcesDirectory)/.build
151+
workingDirectory: $(Build.SourcesDirectory)/NuGet
152+
failOnStderr: true # needed as dotnet pack doesn't set exit code
135153
displayName: Build nugets for Azure Artifacts
136154
condition: and(succeeded(), ne(variables['Build.SourceBranchName'], variables['release_branch']))
137155

138156
- task: CmdLine@2
139157
inputs:
140158
script: $(Build.SourcesDirectory)/NuGet/Pack.cmd snupkg
141-
workingDirectory: $(Build.SourcesDirectory)/.build
159+
workingDirectory: $(Build.SourcesDirectory)/NuGet
160+
failOnStderr: true # needed as dotnet pack doesn't set exit code
142161
displayName: Build nugets for Nuget.org
143162
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], variables['release_branch']))
144163

Build/Azure/pipelines/templates/test-workflow-linux.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ parameters:
44
steps:
55
- checkout: none
66

7-
# .NET 8 SDK already installed https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
7+
# .NET 6 and 8 SDK already installed https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
8+
# but we still need to install all required versions because only last installed available due to bug
89

910
- task: UseDotNet@2
1011
displayName: 'Install .NET 6'

Build/Azure/pipelines/templates/test-workflow-macos.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ steps:
55
- checkout: none
66

77
# .NET 8 SDK already installed https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md#language-and-runtime
8+
# but we still need to install all required versions because only last installed available due to bug
89

910
- task: CmdLine@2
1011
inputs:

Build/Azure/pipelines/templates/test-workflow-windows.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ parameters:
44
steps:
55
- checkout: none
66

7-
# .NET 6 and 8 SDKs already installed https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
7+
# .NET 6, 8 and 9 SDKs already installed https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
88
# so we need to install only x86 versions
99

1010
- task: UseDotNet@2
@@ -248,13 +248,6 @@ steps:
248248
displayName: 'EF.Core Tests (.NET 8 x86): $(title)'
249249
condition: and(eq(variables.net80, 'true'), eq(variables.x86, 'true'), variables.title, succeeded())
250250

251-
- task: UseDotNet@2
252-
displayName: 'Use .NET 9'
253-
inputs:
254-
packageType: sdk
255-
version: 9.x
256-
condition: and(variables.title, eq(variables.net90, 'true'), succeeded())
257-
258251
- task: CmdLine@2
259252
inputs:
260253
script: '$(System.DefaultWorkingDirectory)/scripts/$(script_local)'

0 commit comments

Comments
 (0)