EF 7.0 and Triggers

I update Radzen to Net 7 (and EF 7.0) and facing problem with SQL triggers (SQL Server tables with triggers now require special EF Core configuration)
Please advise me how to do?
Thank you very much

There is a partial method OnModelBuilding in every Radzen generated DbContext that can be used to extend the DbContext in a partial class:


https://forum.radzen.com/search?q=OnModelBuilding

Hi enchev,

There is no partial method OnModelBuilding in RadzenBlazorStudio Context class.

Hey @Werther,

This thread is for Radzen IDE not for Radzen Blazor Studio. Radzen IDE generates the code on every run and that’s why partial classes/methods are needed to add custom code. In Radzen Blazor Studio the code is generated only once when the database is added and you can add any custom code at any time.

Thanks enchev,

But when i make some change in my database and sync it using Radzen Blazor Studio, my custom code inside OnModelCreating method is lost.

You need to create additional partial Context file but edit to generated file

The problem was in Radzen Blazor Studio. Sorry for posting here. It was resolved with an update.