public async Task <IActionResult> PutFeedback(long id, Feedback feedback)
        {
            if (id != feedback.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#2
0
        public async Task <IActionResult> PutPerson(long id, Person person)
        {
            if (id != person.Id)
            {
                return(BadRequest());
            }

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

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

                throw;
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutReview(long id, Review review)
        {
            if (id != review.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutSeniorityLevel(long id, SeniorityLevel seniorityLevel)
        {
            if (id != seniorityLevel.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#5
0
        public async Task <IActionResult> PutDashboard(long id, Dashboard dashboard)
        {
            if (id != dashboard.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }