Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actividad inicial finalizada #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AgustinMacias
Copy link

Description

  • Operaciones CRUD para proveedores
  • Búsqueda de proveedores
  • Swagger mostrando servicios correctamente
  • Conexión con Front end funcionando correctamente
  • ProviderControllerTests corrido y superado

Issues

Opinion

  • launch.json, tasks.json y package-lock.json actualizados automaticamente en vscode

}
catch (Exception ex)
{
logger.LogCritical(ex.StackTrace);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se podria usar otro metodo del logger que no sea LogCritical.
Segun tu punto de vista, cual podria ser y porque ?

https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger?view=dotnet-plat-ext-6.0

catch (Exception ex)
{
logger.LogCritical(ex.StackTrace);
return Ok(new { Success = false, Message = "The name is already in use" });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aqui, al retornar un "Ok", estas retornando un HTTP status 200 al cliente. Que no seria correcto...

Quizas este articulo te de una pista sobre que retornar ahi.

https://code-maze.com/global-error-handling-aspnetcore/

var result = service.GetAll();
return mapper.Map<IEnumerable<ProviderDTO>>(result).ToList();
}
catch (Exception)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se podria loggear la Exception

var result = service.Get(id);
return mapper.Map<ProviderDTO>(result);
}
catch (Exception)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se podria loggear la Exception

model.Condition.Equals(ActionDto.AND));
}

/*if (!string.IsNullOrWhiteSpace(model.Address))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No es buena practica dejar codigo comentado


public string Email { get; set; }

//public List<Product> OfferedProducts { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No es buena practica dejar codigo comentado


public ActionDto Condition { get; set; }

//public List<Product> OfferedProducts { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No es buena practica dejar codigo comentado

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants