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





}