Here is my UserLog model:
public class UserLog
{
public int Id { get; set; }
public ApplicationUser Customer { get; set; }
public DateTime LogDate { get; set; }
}
I created it for risk management purposes. The issue is whenever I want to delete a user from my AspNetUsers
table I have to first delete the rows associated with the user from UserLog
. However, doing this undermines the whole idea of risk management system in place.
Is there a way to remove the FKConstraint placed on the UserLog table? I know that if I remove ApplicationUser and rename Customer
to Customer_Id
code first will delete the row and the constraint, then, recreate it giving it the new name(even though the row is currently named Customer_Id). Is there a work around for this?