public ServiceRefCustomer.Customer ConvertToServiceCustomer(ModelLayer.Customer desktopCustomer) { ServiceRefCustomer.Customer serviceCustomer = null; if (desktopCustomer != null) { serviceCustomer = new ServiceRefCustomer.Customer { Id = desktopCustomer.Id, Address = desktopCustomer.Address, FirstName = desktopCustomer.FirstName, LastName = desktopCustomer.LastName, Email = desktopCustomer.Email, Password = desktopCustomer.Password, Salt = desktopCustomer.Salt, Hash = desktopCustomer.Hash }; } return(serviceCustomer); }
public ModelLayer.Customer ConvertFromServiceCustomer(ServiceRefCustomer.Customer serviceCustomer) { ModelLayer.Customer clientCustomer = null; if (serviceCustomer != null) { clientCustomer = new ModelLayer.Customer { Id = serviceCustomer.Id, Address = serviceCustomer.Address, FirstName = serviceCustomer.FirstName, LastName = serviceCustomer.LastName, Email = serviceCustomer.Email, Password = serviceCustomer.Password, Salt = serviceCustomer.Salt, Hash = serviceCustomer.Hash }; } return(clientCustomer); }
public ServiceRefCustomer.Customer WebConvertToServiceCustomer(Models.WebCustomer webCustomerToAdd) { ServiceRefCustomer.Customer webServiceCustomer = null; if (webCustomerToAdd != null) { webServiceCustomer = new ServiceRefCustomer.Customer { Id = webCustomerToAdd.Id, FirstName = webCustomerToAdd.FirstName, LastName = webCustomerToAdd.LastName, Address = webCustomerToAdd.Address, Email = webCustomerToAdd.Email, Password = webCustomerToAdd.Password, Salt = webCustomerToAdd.Salt, Hash = webCustomerToAdd.Hash }; } return(webServiceCustomer); }