public IndustrialObject MapToOrm(DalIndustrialObject entity) { return(new IndustrialObject { id = entity.Id, // componentLib_id = entity.ComponentLib_id, name = entity.Name }); }
//ComponentLibService componentLibService; public BllIndustrialObject MapToBll(DalIndustrialObject entity) { BllIndustrialObject bllEntity = new BllIndustrialObject { Id = entity.Id, Name = entity.Name, // ComponentLib = entity.ComponentLib_id != null ? componentLibService.Get((int)entity.ComponentLib_id) : null, }; return(bllEntity); }
public DalIndustrialObject MapToDal(BllIndustrialObject entity) { DalIndustrialObject dalEntity = new DalIndustrialObject { Id = entity.Id, Name = entity.Name, //ComponentLib_id = entity.ComponentLib != null ? entity.ComponentLib.Id : (int?)null, }; return(dalEntity); }