I am working on a Vidly style web application. I would like to create columns for CreatedBy and ModifiedBy which are based on user Auth/User accounts. I am not 100% sure what would be the best implementation of those columns in my models.
In Vidly we assigned rented movies to Customers. But customers where never necessarily logged into the application. Instead it was more employees and it never went over logging which employees might have been responsible for which rentals.
I thought maybe I could have an Employee Class with a GUID type variable to store the User GUID. Or alternatively use the ApplicationUser.cs class to store information then pass the ApplicationUser.cs as part of the View Model, or maybe something along those line.
ASP.NET identity documentation doesn’t seem to go over some of the information however I have seen that you can access information via User.Identity.GetUsername() or User.Identity.GetUserID(). However what I don’t understand from that is User.Identity.DriversLicense() isn’t available like we setup in ApplicationUser.cs in Vidly.
So what would be the best implementation of setting CreatedBy or ModifiedBy fields in a database based off the User logged in and Accessing some of the Driverslicense fields, or other fields the users may have.