private void MakeName(MenuPathMain entity) { MenuPath1 menu1; MenuPath2 menu2; MenuPath3 menu3; if (!entity.MenuPath1Id.IsNullOrWhiteSpace()) { menu1 = _menupath1Biz.Find(entity.MenuPath1Id); } else { menu1 = entity.MenuPath1; } if (!entity.MenuPath2Id.IsNullOrWhiteSpace()) { menu2 = _menupath2Biz.Find(entity.MenuPath2Id); } else { menu2 = entity.MenuPath2; } if (!entity.MenuPath3Id.IsNullOrWhiteSpace()) { menu3 = _menupath3Biz.Find(entity.MenuPath3Id); } else { menu3 = entity.MenuPath3; } menu1.IsNullThrowException(); menu2.IsNullThrowException(); menu3.IsNullThrowException(); entity.Name = entity.MakeName(menu1.Name, menu2.Name, menu3.Name); }
private void fixName(MenuPathMain entity) { entity.Name = entity.MakeName(entity.MenuPath1.Name, entity.MenuPath2.Name, entity.MenuPath3.Name); }