public SysLogModel(SysLog sysLog) { this.Id = sysLog.Id; if (sysLog.User != null) this.UserName = sysLog.User.LoginName; this.Content = sysLog.Content; this.CreateTimeString = sysLog.CreateTime.ToString("yyyy-MM-dd HH:mm:ss dddd"); }
public static SysLogModel From(SysLog log) { return new SysLogModel(log); }
public SysLogModel(SysLog log) { this.LogInfo = log.LogInfo; this.User = log.User != null ? log.User.LoginName : ""; this.CreateTime = log.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"); }