public async Task <IActionResult> AddMatch([FromBody] Match model) { if (!ModelState.IsValid) { return(BadRequest()); } try { await _context.AddAsync(model); await _context.SaveChangesAsync(); } catch { return(BadRequest()); } return(Ok()); }
public async Task AddAsync(Hero hero) { await _context.AddAsync(hero); }