public void Create(GuestsPhoneNumbersDTO guestPhone)
 {
     db.GuestsPhoneNumbers.Create(new GuestsPhoneNumbers
     {
         GuestMail           = guestPhone.GuestMail,
         PhoneNumberTypeCode = guestPhone.PhoneNumberTypeCode,
         PhoneNumber         = guestPhone.PhoneNumber
     });
     db.Save();
 }
예제 #2
0
        public ActionResult Create([Bind(Include = "Id,GuestMail,PhoneNumberTypeCode,PhoneNumber")] GuestsPhoneNumbersDTO phone, string login)
        {
            if (login == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            phone.GuestMail = login;

            phonesService.Create(phone);

            return(RedirectToAction("Details", "HotelGuests", new { id = login }));
        }