예제 #1
0
        public async Task <IActionResult> CreateConfigs(int id)
        {
            try
            {
                var customerProduct = _repository.Get()
                                      .Include(c => c.Customer)
                                      .Include(p => p.Product)
                                      .Where(x => x.CustomersProductsId == id)
                                      .First();

                await DatabaseHelpers.Create(customerProduct);

                return(Ok());
            }
            catch (Exception err)
            {
                return(NotFound(err.Message));
            }
        }