Hi
I am using generic repository pattern for CRUD operations. I want to audit trail when User modify record. I want to log modified property name, current value and new value. How to log this using EF 6.1.3?
public class DataRepository<TEntity> : IRepository<TEntity> where TEntity : class
{
public bool Update(TEntity entity)
{
try
{
using (rateEntities entities = new rateEntities())
{
entities.Entry(entity).State = System.Data.Entity.EntityState.Modified;
entities.SaveChanges();
return true;
}
}
catch (Exception exception)
{
throw exception;
}
}
}Thanks