EntityFramework-Reverse-POCO-Code-First-Generator
EntityFramework-Reverse-POCO-Code-First-Generator copied to clipboard
how to add interceptor?
I could not override the configuration Please help me
There are interceptors in your <database>.tt file. You will see them called as a delegate such as:
- Settings.TableRename
- Settings.UpdateTable
- Settings.UpdateColumn
- etc
What is it you are trying to do?
Thanks for the guide.
I meant this piece of code
`protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { base.OnConfiguring(optionsBuilder);
optionsBuilder.AddInterceptors(new IgnoreTrackingInterceptor());
}`
How to use AddInterceptors?
Hi @javadinasabVahid
I don't have a callback for that, so you will have to tweak the .ttinclude file.
Search for optionsBuilder.UseLazyLoadingProxies();{{#newline}}
There will be a few results, two each for EFCore3, EFCore6, EFCore7, EFCore8
Try adding in your line above
{{#if UseLazyLoadingProxies}}
optionsBuilder.UseLazyLoadingProxies();{{#newline}}
{{/if}}