Пример #1
0
        public async Task <IActionResult> Put(D2Athlete d2athlete)
        {
            _context.Entry(d2athlete).State = EntityState.Modified;
            await _context.SaveChangesAsync();

            return(NoContent());
        }
Пример #2
0
        public async Task <IActionResult> Post(D2Athlete d2athlete)
        {
            _context.Add(d2athlete);
            await _context.SaveChangesAsync();

            return(Ok(d2athlete.Id));
        }
Пример #3
0
        public async Task <IActionResult> Delete(int id)
        {
            var dev = new D2Athlete {
                Id = id
            };

            _context.Remove(dev);
            await _context.SaveChangesAsync();

            return(NoContent());
        }