Accessing the Identity object in a MVC repository
Posted
by Rod
on Stack Overflow
See other posts from Stack Overflow
or by Rod
Published on 2010-05-31T21:31:20Z
Indexed on
2010/05/31
21:33 UTC
Read the original article
Hit count: 288
Hi, I have a pretty generic repository that does basic CRUD for many of my business entities. The entities enherit form a generic object that has a few fields I maintain for all objects. eg. ModifiedBy, CreatedBy, CreatedDate, ModifiedDate.
These fields ModifiedBy and CreatedBy will always be set before any update/save.
My questions is: Is there any way to gain access to the Identity object from my MVC web application in my repositories? I was hoping to set the modifiedby to the identity user for any update in one shot??
Best Regard, Rod
© Stack Overflow or respective owner