Exemplo n.º 1
0
        public async Task <ActionResult <FundOrders> > PostFundOrders(FundOrders fundOrders)
        {
            _context.FundOrders.Add(fundOrders);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetFundOrders", new { id = fundOrders.FundOrderId }, fundOrders));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> PutFundOrders(int id, FundOrders fundOrders)
        {
            id = fundOrders.FundOrderId;

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

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

            return(NoContent());
        }