public IActionResult PutCheckOut(int id, [FromBody] CheckInCheckOut checkInCheckOut) { var checkoutDoBanco = _context.CheckInCheckOuts.SingleOrDefault(e => e.Id == checkInCheckOut.Id); checkInCheckOut.CheckOut(); checkoutDoBanco.DateTimeExit = checkInCheckOut.DateTimeExit; _context.SaveChanges(); return(NoContent()); }
public void CheckOut() { int id = 1; int idAlien = 1; int idBallad = 1; int?idObjectNotAllowed = null; var checkInCheckOut = new CheckInCheckOut(id, idAlien, idBallad, idObjectNotAllowed); checkInCheckOut.CheckOut(); Assert.True(checkInCheckOut.DateTimeExit != null); }