예제 #1
0
        public async Task <Event> AddEvent(Event eventParams)
        {
            if (eventParams != null)
            {
                await context.AddAsync(eventParams);

                await context.SaveChangesAsync();

                return(eventParams);
            }
            return(null);
        }
예제 #2
0
        public async Task <Customer> AddCustomer(Customer customer)
        {
            if (customer != null)
            {
                await context.AddAsync(customer);

                await context.SaveChangesAsync();

                return(customer);
            }
            return(null);
        }