Exemplo n.º 1
0
        public async Task <IActionResult> Putcheck(int id, check check)
        {
            if (id != check.checkId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Putmyfoods(int id, myfoods myfoods)
        {
            if (id != myfoods.myfoodsId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("azizId,azizName")] aziz aziz)
        {
            if (ModelState.IsValid)
            {
                _context.Add(aziz);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(aziz));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> Create([Bind("noriId,noriName")] nori nori)
        {
            if (ModelState.IsValid)
            {
                _context.Add(nori);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(nori));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> Create([Bind("checkId,checkName")] check check)
        {
            if (ModelState.IsValid)
            {
                _context.Add(check);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(check));
        }