예제 #1
0
        public async Task <IActionResult> PutLogHistory(long id, LogHistory logHistory)
        {
            if (id != logHistory.Id)
            {
                return(BadRequest());
            }

            _context.Entry(logHistory).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!LogHistoryExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
예제 #2
0
        public async Task <IActionResult> PutCrmCustomer(long id, CrmCustomer crmCustomer)
        {
            if (id != crmCustomer.Id)
            {
                return(BadRequest());
            }

            _context.Entry(crmCustomer).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CrmCustomerExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
예제 #3
0
        public async Task <IActionResult> PutPreSale(long id, PreSale preSale)
        {
            if (id != preSale.Id)
            {
                return(BadRequest());
            }

            _context.Entry(preSale).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!PreSaleExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }