public async Task <IActionResult> PutWebContentType(int id, WebContentType webContentType)
        {
            if (id != webContentType.WebContentTypeId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#2
0
        public async Task <IActionResult> PutDivision(int id, Division division)
        {
            if (id != division.DivisionID)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#3
0
        PutWebContent(int id, WebContent webContent)
        {
            if (id != webContent.WebContentId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }