public static LogViewModel ToLogViewModel(this DataAccess.Log logEntity) { return(new LogViewModel { LogId = logEntity.LogId, Message = logEntity.Message, CreateBy = logEntity.CreateBy }); }
public static Common.Log ToCommonLog(this DataAccess.Log log) { if (log == null) { return(null); } return(new Common.Log { Id = log.Id, Descriptions = log.Descriptions, Device = log.Device, Latitude = log.Latitude, Longitude = log.Longitude, LocalTime = log.LocalTime, UtcTime = log.UtcTime, LogType = log.LogType, Section = log.Section, Title = log.Title, Username = log.Username }); }
/// <summary> /// 保存操作日志 /// </summary> /// <param name="log"></param> /// <returns></returns> public override bool Save(DataAccess.Log log) { DbManager.Logs.InsertOne(log); DeleteLogAsync(); return(true); }