public ActionResult addBranch(int id, wfWorkBranchView model) { model.wfnID = id; model.fCreateTime = DateTime.Now; model.fUpdateTime = DateTime.Now; model.fCreatorID = UserMgr.GetCurrentUserInfo().uID; workbranchSer.Add(model.EntityMap()); workbranchSer.SaveChanges(); return(WriteSuccess("添加成功")); }
public static wfWorkBranch EntityMap(this wfWorkBranchView model) { //2.0 将一个实体转换成另外一个实体 return(Mapper.Map <wfWorkBranchView, wfWorkBranch>(model)); }
public static wfWorkBranch EntityMap(this wfWorkBranchView model) { return(Mapper.Map <wfWorkBranchView, wfWorkBranch>(model)); }