예제 #1
0
        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));
            }
        }
예제 #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                _uow.Dispose();
            }

            _disposed = true;
        }
예제 #3
0
 /// <summary>
 /// dispose
 /// </summary>
 public void Dispose()
 {
     _unitOfWork.Dispose();
 }