public async Task <ActionResult <MemberItemLog> > PostMemberItemLog(MemberItemLog memberItemLog) { _context.MemberItemLogs.Add(memberItemLog); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMemberItemLog", new { id = memberItemLog.Id }, memberItemLog)); }
public async Task <IActionResult> PutMemberItemLog(int id, MemberItemLog memberItemLog) { if (id != memberItemLog.Id) { return(BadRequest()); } _context.Entry(memberItemLog).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MemberItemLogExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }