温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:NBear+NBear开发BBS系统源码
当前文件:
NBBS/NBearDAL/EntityConvertor/MotherBoardConvertor.cs,打开代码结构图
NBBS/NBearDAL/EntityConvertor/MotherBoardConvertor.cs,打开代码结构图1using System; 2
using NBBS.Entity; 3
4
namespace NBBS.NBearDAL.EntityConvertor 5
{ 6
/// <summary> 7
/// 实体类转换器-主版面 8
/// </summary> 9
public class MotherBoardConvertor 10
{ 11
public static t_MotherBoard EntityToNBear(MotherBoardInfo motherBoard) 12
{ 13
t_MotherBoard motherBoardTable = new t_MotherBoard(); 14
15
motherBoardTable.MotherBoard_ID = motherBoard.ID; 16
motherBoardTable.MotherBoard_Name = motherBoard.Name; 17
motherBoardTable.MotherBoard_Place = motherBoard.Place; 18
19
return motherBoardTable; 20
} 21
22
public static MotherBoardInfo NBearToEntity(t_MotherBoard motherBoardTable) 23
{ 24
MotherBoardInfo motherBoard = new MotherBoardInfo(); 25
26
motherBoard.ID = motherBoardTable.MotherBoard_ID; 27
motherBoard.Name = motherBoardTable.MotherBoard_Name; 28
motherBoard.Place = motherBoardTable.MotherBoard_Place; 29
30
return motherBoard; 31
} 32
} 33
} 34





}