Beispiel #1
0
        public dynamic AddVenue(VenueModel values)
        {
            var Venues = new Venues();

            Venues.Address        = values.Address;
            Venues.contactPersons = values.ContactPersons;
            Venues.curfView       = DateTime.Now;
            Venues.loadIn         = DateTime.Now;
            Venues.Name           = values.Name;
            Venues.TelefonNumber  = values.Number;
            _tourManagerContext.Venues.Add(Venues);
            _tourManagerContext.SaveChanges();
            return(values);
        }
        public dynamic DeleteVenue(int id)
        {
            var entity = _tourManagerContext.Venues.SingleOrDefault(x => x.Id == id);

            _tourManagerContext.Remove(entity);
            _tourManagerContext.SaveChanges();
            return(true);
        }
Beispiel #3
0
        public void Add(ContactsModel values)
        {
            var contacts = new Contacts();

            contacts.Address       = values.Address;
            contacts.Email         = values.Email;
            contacts.FirstName     = values.FirstName;
            contacts.LastName      = values.LastName;
            contacts.TelefonNumber = values.TelefonNumber;

            _tourManagerContext.Contacts.Add(contacts);
            _tourManagerContext.SaveChanges();
        }