Releases: win7user10/Laraue.EfCoreTriggers
EFCore 8 support
8.0.0 update yaml
5.5.1
Fix date time offset generation for Postgres
Trigger API has been updated
New triggers API
The main difference is related to the way of relating to the old and new rows in a trigger.
Early each reference was in its own parameter
.Insert<UserBalance>((oldRow, newRow) => new MyEntity { Value = oldRow.Value + newRow.Value }
now the one variable contains all references
.Insert<UserBalance>(tableRefs => new MyEntity { Value = tableRefs .Old.Value + tableRefs.New.Value }
Update Upsert and InsertIfNotExists API
The next updates are related to the changed Upsert and InsertIfNotExists API. Now they consume predicates as the first parameter instead of NewExpression, which sounds more logical.
Early
.Upsert(deletedTransaction => new UserBalance { UserId = deletedTransaction.UserId } ..)
and now
.Upsert((tableRefs, balances) => tableRefs.Old.UserId == balances.UserId, ..)
Configuring trigger prefix
Not the trigger prefixes can be changed via te next static parameter
Laraue.EfCoreTriggers.Common.Constants.AnnotationKey = "MY_PREFIX"
Support of string enum values
What's Changed
- Feature/Support of string enum values by @win7user10 in #63
Full Changelog: 5.3.8...6.4.1
Count expression on related entity support added
Added translation of count expressions:
Without predicate e.g. Entity.SubEntites.Count()
With predicate e.g. Entity.SubEntites.Count(x => x.SubValue > 2)
Support of inheritance
What's Changed
- Feature/new project structure by @win7user10 in #28
- Feature/Entity inheritance support by @win7user10 in #30
- Feature/correct registering ef core triggers services by @win7user10 in #31
- Feature/one branch for all versions by @win7user10 in #32
API Changes
Registering custom method call converters changed, see the documentation
Full Changelog: v6.1.0...6.2.0
Support of raw SQL triggers
What's Changed
- Update to EF Core 6 by @win7user10 in #17
- make it clear that Customization is not only for Sqlite by @fritz-net in #18
- fixed issue with table names not in lower case in postgresql by @fritz-net in #20
- Can use database keywords as column names by @zirou5055 in #21
- Feature/raw sql triggers by @win7user10 in #22
New Contributors
- @fritz-net made their first contribution in #18
Full Changelog: v1.1.0...v6.1.0
Math and String expressions support
feat: math expressions support
feat: string expressions support
feat: new syntax for Upsert and InsertIfNotExists (the last parameter now consumes object of TUpsert type instead of object)
feat: new tests structure, a lot of test cases added and fixes for them made
Added strings EndsWith, Trim and Contains translations
Release contains newly extendable architecture for database providers and translation of some string functions to SQL.
Cast expressions support
fix(Issue#3): Exception while using enum properties
fix: Incorrect amount of arguments in InsertAfterUpdate trigger
feat: Support of generating cast expressions
feat: Support of new Guid() expressions
cleanup && some code comments