/// <summary>Customers.</summary> /// <param name="customerId"> Identifier for the customer.</param> /// <param name="companyName"> Name of the company.</param> /// <param name="contactName"> Name of the contact.</param> /// <param name="contactTitle">The contact title.</param> /// <param name="address"> The address.</param> /// <param name="city"> The city.</param> /// <param name="region"> The region.</param> /// <param name="postalCode"> The postal code.</param> /// <param name="country"> The country.</param> /// <param name="phoneNo"> The phone no.</param> /// <param name="faxNo"> The fax no.</param> /// <param name="picture"> The picture.</param> /// <returns>A Customer.</returns> public static Customer Customer(string customerId, string companyName, string contactName, string contactTitle, string address, string city, string region, string postalCode, string country, string phoneNo, string faxNo, byte[] picture) { Customer customer = new Customer(); customer.Id = customerId; customer.CompanyName = companyName; customer.ContactName = contactName; customer.ContactTitle = contactTitle; customer.Address = address; customer.City = city; customer.Region = region; customer.PostalCode = postalCode; customer.Country = country; customer.Phone = phoneNo; customer.Fax = faxNo; customer.Picture = picture; return customer; }
public static CustomerDto ToCustomerDto(Customer model) { return new CustomerDto { Id = model.Id, Picture = model.Picture, CompanyName = model.CompanyName, ContactName = model.ContactName, ContactTitle = model.ContactTitle, Fax = model.Fax, Phone = model.Phone, Address = model.Address, City = model.City, Country = model.Country, PostalCode = model.PostalCode, Region = model.Region, }; }