public ActionResult GetById(Guid id) { var game = _uow.GameRepository.GetById(id); _uow.Dispose(); if (game == null) { return(BadRequest("Nenhum jogo encontrado")); } else { return(Ok(game)); } }
protected virtual void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { _uow.Dispose(); } _disposed = true; }
/// <summary> /// dispose /// </summary> public void Dispose() { _unitOfWork.Dispose(); }