コード例 #1
0
        public async Task <ActionResult <Afatet> > PostAfatet(Afatet afatet)
        {
            _context.Afatet.Add(afatet);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetAfatet", new { id = afatet.Id }, afatet));
        }
コード例 #2
0
        public async Task <IActionResult> PutAfatet(int id, Afatet afatet)
        {
            if (id != afatet.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
コード例 #3
0
 public Task <Afatet> Update(int id, Afatet newT)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public Task <Afatet> Add(Afatet t)
 {
     throw new NotImplementedException();
 }