コード例 #1
0
        public DataAccessLayerCommon.Branch MapFromModel(Models.Branch branch)
        {
            DataAccessLayerCommon.Branch tempBranch = new DataAccessLayerCommon.Branch
            {
                Id   = branch.Id,
                Name = branch.Name
            };

            ConcatAddress(tempBranch, branch);
            return(tempBranch);
        }
コード例 #2
0
        public Models.Branch MapFromEntity(DataAccessLayerCommon.Branch branch)
        {
            Models.Branch tempBranch = new Models.Branch
            {
                Id   = branch.Id,
                Name = branch.Name
            };
            SplitAddress(branch.Address, tempBranch);

            return(tempBranch);
        }
コード例 #3
0
 private void ConcatAddress(DataAccessLayerCommon.Branch branch, Models.Branch tempBranch)
 {
     branch.Address = tempBranch.Country + "," + tempBranch.City + "," + tempBranch.Street;
 }