public ActivityLogEntity AddLog(string descriminator, 
     ActivityLogLevel level = ActivityLogLevel.Info, 
     string message = null,
     IClassifiable classifiable = null,
     object contract = null)
 {
     var entry = new ActivityLogEntity();
     entry.Descriminator = descriminator;
     entry.Message = message;
     entry.Level = level;
     if(contract!=null)entry.SetValue(contract);
     if (classifiable != null)
     {
         entry.ClassifiableId = classifiable.Id;
         entry.ClassifiableName = classifiable.ObjectName;
     }
     entry = logRepo.Save(entry);
     InvokeOnNewLog(entry);
     return entry;
 }
 public void InvokeOnNewLog(ActivityLogEntity log)
 {
     LogHandler handler = OnNewLog;
     if (handler != null) handler(log);
 }