Exemple #1
0
        public IActionResult PutLandingRegistration(long id, LandingRegistrationRequest landingRegistration)
        {
            if (id != landingRegistration.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemple #2
0
        public async Task <IActionResult> PutUserAuth(long id, UserAuth userAuth)
        {
            if (id != userAuth.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }