public static IncidentData ToModel(this IIncidentLog log, bool withDetails = false)
 {
     if(log == null)
     return null;
       var data = new IncidentData() {
     Type = log.Type, SubType = log.SubType,
     Message = log.Message,
     Key1 = log.Key1, Key2 = log.Key2, KeyId1 = log.KeyId1, KeyId2 = log.KeyId2,
     LongKey3 = log.LongKey3, LongKey4 = log.LongKey4
       };
       data.AssignCommon(log);
       if (withDetails) {
     data.Notes = log.Notes;
       }
       return data;
 }
        public static IncidentData ToModel(this IIncidentLog log, bool withDetails = false)
        {
            if (log == null)
            {
                return(null);
            }
            var data = new IncidentData()
            {
                Type     = log.Type, SubType = log.SubType,
                Message  = log.Message,
                Key1     = log.Key1, Key2 = log.Key2, KeyId1 = log.KeyId1, KeyId2 = log.KeyId2,
                LongKey3 = log.LongKey3, LongKey4 = log.LongKey4
            };

            data.AssignCommon(log);
            if (withDetails)
            {
                data.Notes = log.Notes;
            }
            return(data);
        }