public static void ToEntity(DT.StateLog source, DB.StateLog target) { if ((source != null) && (target != null)) { target.StateLogId = source.Id; target.DateTime = source.DateTime; target.Exception = source.Exception; target.TaskId = source.TaskId; target.SlaveId = source.SlaveId; target.State = Convert.ToEntity(source.State); target.UserId = source.UserId; } }
public static DB.StateLog ToEntity(DT.StateLog source) { if (source == null) { return(null); } var entity = new DB.StateLog(); ToEntity(source, entity); return(entity); }
public static DA.StateLog ToEntity(this DT.StateLog source) { return(new DA.StateLog { StateLogId = source.Id, State = source.State.ToEntity(), DateTime = source.DateTime, TaskId = source.TaskId, UserId = source.UserId, SlaveId = source.SlaveId, Exception = source.Exception }); }