aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio_v2/Tango.BLL/Mappers/ContactToContactModelMapper.cs
blob: a7691b3b3b45808517435e79e5a014a8dcbfed16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Collections.Generic;
using System.Text;
using Tango.BLL.Objects;
using Tango.DAL.Models;

namespace Tango.BLL.Mappers
{
    public class ContactToContactModelMapper : MapperBase<Contact,ContactModel> 
    {
        public override void Map(Contact source, ContactModel target)
        {
            target.Email = source.Email;
            target.Fax = source.Fax;
            target.FirstName = source.FirstName;
            target.FullName = source.FirstName + " " + source.LastName;
            target.LastName = source.LastName;
            target.PhoneNumber = source.PhoneNumber;
        }

        public override void Map(ContactModel source, Contact target)
        {
            target.Email = source.Email;
            target.Fax = source.Fax;
            target.FirstName = source.FirstName;
            target.LastName = source.LastName;
            target.PhoneNumber = source.PhoneNumber;
        }
    }
}