You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What i try to achieve is to set the values for the above mentioned properties at runtime by using one of the provided DbCommandInterceptor functions. I already tried to implement something like this:
@R4ZuL A command interceptor is likely not the right approach for this, since you're not to be able to change which properties to save at this point. Typically this is done by overriding SaveChanges. In EF Core 5.0, the SaveChanges interceptor or event could be used instead.
Hi,
i have a customer entity that includes CreatedBy, CreatedAt, ModifiedBy and ModifiedAt properties.
What i try to achieve is to set the values for the above mentioned properties at runtime by using one of the provided DbCommandInterceptor functions. I already tried to implement something like this:
As you can imagine this didn't work. Can you provide me any solution ?
Further technical details
EF Core version: Microsoft.EntityFrameworkCore 3.1.4, Microsoft.EntityFrameworkCore.Relational 3.1.4
Database provider: Microsoft.EntityFrameworkCore.SqlServer (Productive), Microsoft.EntityFrameworkCore.Sqlite (Testing)
Target framework: : .NETCore 3.1
Operating system: Microsoft Windows 10
IDE: Visual Studio 2019 16.6.3
The text was updated successfully, but these errors were encountered: