I have more than 40 models in my application, and now i am trying to implement logging system. For the first phase, i want to keep the information of "Created By" and "Created Date" information for all the rows in all the tables.
I think i can create a base class which includes the attributes"CRDATE" and "CRBY", and create all of my models from this base class. But how can i write a generic method, to insert CRDATE and CRBY, and also deleted boo information ?
Here is my base-model:
public class BaseModel
{
public DateTime CrDate { get; set; }
public int UserId { get; set; }
public ApplicationUser User { get; set; }
public bool IsDeleted { get; set; }
}
Should i use generic repository actions ?
Regards