コード例 #1
0
        public void AddNewCustomer(BalloonParty.Core.Models.Customer customer)
        {
            var newCustomer = Mapper.MapSQLCustomer(customer);

            _context.Add(newCustomer);
            Save();
        }
コード例 #2
0
 public static BalloonParty.DataAccess.SQLData.Customer MapSQLCustomer(BalloonParty.Core.Models.Customer customer)
 {
     return(new BalloonParty.DataAccess.SQLData.Customer
     {
         FirstName = customer.FirstName,
         LastName = customer.LastName,
         EmailAddress = customer.EmailAddress,
         CustomerPw = customer.CustomerPw,
         Address = customer.Address,
         City = customer.City,
         State = customer.State,
         ZipCode = customer.ZipCode,
     });
 }