public async Task <Event> CreateAsync(Event model)
        {
            Events eventDataAccess = Mapper.Map <Event, Events>(model);

            _db.Add(eventDataAccess);

            model = Mapper.Map <Events, Event>(eventDataAccess);
            return(model);
        }
        public async Task <Room> CreateAsync(Room model)
        {
            Rooms room = Mapper.Map <Room, Rooms>(model);

            _db.Add(room);

            model = Mapper.Map <Rooms, Room>(room);
            return(model);
        }
        public async Task <EventCustomer> CreateAsync(EventCustomer model)
        {
            EventsCustomers eventDataAccess = Mapper.Map <EventCustomer, EventsCustomers>(model);

            _db.Add(eventDataAccess);

            model = Mapper.Map <EventsCustomers, EventCustomer>(eventDataAccess);
            return(model);
        }
        public async Task <Employee> CreateAsync(Employee model)
        {
            Employees employee = Mapper.Map <Employee, Employees>(model);

            _db.Add(employee);

            model = Mapper.Map <Employees, Employee>(employee);
            return(model);
        }
示例#5
0
        public async Task <Customer> CreateAsync(Customer model)
        {
            Customers customer = Mapper.Map <Customer, Customers>(model);

            _db.Add(customer);

            model = Mapper.Map <Customers, Customer>(customer);
            return(model);
        }
        public async Task <Reservation> CreateAsync(Reservation model)
        {
            Reservations reservation = Mapper.Map <Reservation, Reservations>(model);

            _db.Add(reservation);

            model = Mapper.Map <Reservations, Reservation>(reservation);
            return(model);
        }