v0.13

v0.13.1

Bugfixes

  • Post build target for generating code was incorrect in .targets file, fixed

v0.13.0

.NET Upgrade

Baked now supports .NET 9! Below you can find a task list to upgrade your projects.

- [ ] Upgrade .NET and C# versions
  - [ ] in projects
  - [ ] in docker files
  - [ ] in GitHub workflows
- [ ] Upgrade Baked version
- [ ] You can use `GeneratedRegex`es in properties instead of methods
- [ ] If `Base64` encoded information is carried in the url, use `Base64Url`
- [ ] `params` arguments should be converted from arrays to `IEnumerable`
- [ ] Use the new linQ extensions(`CountBy`, `AggregateBy`,
  `Index<TSource>(IEnumerable<TSource>))`.
- [ ] Use new `TimeSpan.From*` overloads
  - `FromDays`
  - `FromHours`
  - `FromMinutes`
  - `FromSeconds`
  - `FromMilliseconds`
  - `FromMicroseconds`
- [ ] Use Keyed Services in Middlewares.
- [ ] Use semicolon instead of curly braces for empty class declarations

Upgrade .NET and C# versions

  • Upgrade the project's C# language to 13.
  • Framework version upgrade to net9.0 in the projects.
  • Framework and sdk version upgrade to 9 in Dockerfile.
  • Upgrade dotnet version 9 in Github actions.

Features

  • Application now provies Generate and Start modes which can be run both together or individually with distinct ApplicationContext's.
    • RunFlags is introduced for configuring application mode
  • LayerBase now provies GetGeneratePhases() method to enable registering specific phases to run at Generate mode
  • Service and Data Source recipies now triggers Generate mode run at post build
  • Domain layer's AddDomainTypes and BuildDomainModel phases now only runs in Generate mode
  • CodeGeneration layer's GenerateCode and Compile phases now only runs in Generate mode
  • CodeGeneration layer now introduces IGeneratedFileCollection which enables generating data files in Generate mode
  • CodeGeneration layer now introduces GeneratedContext at BuildConfiguration phase which provides access to generated assemblies and files in Start mode
  • Domain layer now provides a DomainServicesCollection configuration target in Generate mode which will then be used to generate IServiceAdder implementation

Improvements

  • CodeGeneration layer now compiles and saves generated assemblies and files to entry assembly location with ASPNETCORE_ENVIRONMENT subfolder
  • DomainAssemblies feature now generates
    • ICasterConfigurer implementations and
    • TagDescriptor
    • RequestResponseExample json files in Generate mode
  • AutoMapOrm feature now generates IServiceAdder implementations from DomainModel in Generate mode
  • GiveMe.PropertyOf<T> helper is renamed to ThePropertyOf<T>
  • GiveMe.MethodOf<T> helper is renamed to TheMethodOf<T>
  • Following features now use DomainServicesModel target to register services in Generate mode
    • Transient
    • Scoped
    • Singleton
  • GiveMe.PropertyOf<T> helper is renamed to ThePropertyOf<T>
  • GiveMe.MethodOf<T> helper is renamed to TheMethodOf<T>
  • Removed namespaces from SchemaId created in Swagger.
  • ProblemDetails feature now no longer searches domain assemblies and IExceptionHandler implementations are required to be added in ConfigurationOverrider feature
  • LayerConfigurator now provides Use<T> helper to use phase artifacts and no longer provides access to application context

Library Upgrades

PackageOld VersionNew Version
coverlet.collector6.0.26.0.4
Microsoft.AspNetCore.Mvc.NewtonsoftJson8.0.89.0.1
Microsoft.AspNetCore.Mvc.Testing8.0.109.0.1
Microsoft.AspNetCore.Authorization8.0.8removed
Microsoft.CodeAnalysis.CSharp4.11.04.12.0
Microsoft.CodeAnalysis.Analyzers3.3.4removed
Microsoft.Extensions.Caching.Abstraction8.0.09.0.1
Microsoft.Extensions.Configuration.Abstractions8.0.09.0.1
Microsoft.Extensions.Configuration.Binder8.0.29.0.1
Microsoft.Extensions.FileProviders.Abstractions8.0.09.0.1
Microsoft.Extensions.Logging.Abstractions8.0.29.0.1
Microsoft.Extensions.TimeProvider.Testing8.10.09.1.0
Microsoft.NET.Test.Sdk17.11.117.12.0
MySql.Data9.1.09.2.0
NHibernate.Extensions.Sqlite8.0.149.0.0
NUnit4.2.24.3.2
Npgsql8.0.59.0.2
Oracle.ManagedDataAccess.Core23.6.023.7.0
Shouldly4.2.14.3.0
Swashbuckle.AspNetCore6.9.07.2.0
Swashbuckle.AspNetCore.Annotations6.9.07.2.0