public static VesselEngine ToEntity(this VesselEngineViewModel model) { if (model == null) { return(null); } VesselEngine entity = new VesselEngine { Id = model.Id, VesselId = model.VesselId, SystemModification = model.SystemModification, EngineNumber = model.EngineNumber, Power = model.Power, Type = model.Type }; return(entity); }
public static VesselEngineViewModel ToViewModel(this VesselEngine entity) { if (entity == null) { return(null); } VesselEngineViewModel model = new VesselEngineViewModel { Id = entity.Id, VesselId = entity.VesselId, SystemModification = entity.SystemModification, EngineNumber = entity.EngineNumber, Power = entity.Power, Type = entity.Type }; return(model); }
internal VesselLogger(VesselEngine engine) { Logger = this; }
internal VesselLogger(VesselEngine engine) { this.engine = engine; Logger = this; }