Starting a stored procedure after SaveChanges in Entity Framework 1.0

I have an audit table in a SQL Server 2008 database that tracks all changes made to tables. It does a great job of this, except that it cannot catch the username of the current user, because my connection string uses the same username for all connections.

This application is written in ASP.NET MVC, so I have a username stored in the connection string.

Question: how can I pass the username to this table AFTER I call the SaveChanges function?

+3
source share
1 answer

SaveChanges . ( ), SaveChanges, . , .

, SaveChanges. , ObjectContext - - . Save .

+1

Source: https://habr.com/ru/post/1764062/


All Articles