Ejemplo n.º 1
0
        public async Task <ActionResult <Board_Members> > PostBoard_Members(Board_Members board_Members)
        {
            _context.Board_Members.Add(board_Members);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetBoard_Members", new { id = board_Members.Board_MembersId }, board_Members));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> PutBoard_Members(int id, Board_Members board_Members)
        {
            if (id != board_Members.Board_MembersId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }