public async Task <ActionResult <AppTranslate> > PostAppTranslate(AppTranslate appTranslate) { _context.AppTranslate.Add(appTranslate); await _context.SaveChangesAsync(); return(CreatedAtAction("GetAppTranslate", new { id = appTranslate.Id }, appTranslate)); }
public async Task <IActionResult> PutAppTranslate(int id, AppTranslate appTranslate) { if (id != appTranslate.Id) { return(BadRequest()); } _context.Entry(appTranslate).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AppTranslateExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }