Exemple #1
0
        public async Task <IActionResult> PutCashAccounts(int id, CashAccounts cashAccounts)
        {
            if (id != cashAccounts.CashAccountId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutEquities(int id, Equities equities)
        {
            if (id != equities.EquityId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutSectors(int id, Sectors sectors)
        {
            if (id != sectors.SectorId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }