Пример #1
0
        public async Task <IActionResult> PutCommand(int id, Command command)
        {
            if (id != command.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Пример #2
0
        public async Task <IActionResult> PutPlatform(int id, Platform platform)
        {
            if (id != platform.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Пример #3
0
 public void Update(User user)
 {
     _commandsContext.Entry(user).State = EntityState.Modified;
 }
Пример #4
0
 public void Update(Domain.AggregatesModel.Tasks.Task task)
 {
     _commandsContext.Entry(task).State = EntityState.Modified;
 }