public static GrandDto ConvertToDto(GrandBo bo) { if (bo == null) { return(null); } GrandDto dto = new GrandDto(); dto.Id = bo.Id; dto.GrandName = bo.GrandName; return(dto); }
public static GrandBo ConvertToBusinessObject(GrandBo dto) { if (dto == null) { return(null); } GrandBo bio = new GrandBo(); bio.Id = dto.Id; bio.GrandName = dto.GrandName; return(bio); }
public static RoleDto ConvertToDto(RoleBo bo) { if (bo == null) { return(null); } RoleDto dto = new RoleDto(); dto.Id = bo.Id; dto.RoleName = bo.RoleName; dto.Desc = bo.Desc; dto.Grand = bo.GrandRole.Select(x => GrandBo.ConvertToDto(x.Grand)).ToList(); return(dto); }