Example #1
0
 public CustomerViewModel(Customer customer)
 {
     if (customer != null)
     {
         this.Id = customer.Id;
         this.Name = customer.Name;
         this.Surname = customer.Surname;
         this.TelephoneNumber = customer.TelephoneNumber;
         this.Address = customer.Address;
     }
 }
Example #2
0
 public long Add(string name, string surname, string phone, string address)
 {
     var customer = new Customer() {Name = name, Surname = surname, TelephoneNumber = phone, Address = address};
     unitOfWork.Repository<Customer>().Insert(customer);
     return customer.Id;
 }