-
Notifications
You must be signed in to change notification settings - Fork 240
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
Ejercicio backend Nivel 1 #150
base: master
Are you sure you want to change the base?
Conversation
} | ||
catch (Exception ex) | ||
{ | ||
logger.LogCritical(ex.StackTrace); |
There was a problem hiding this comment.
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 ?
catch (Exception ex) | ||
{ | ||
logger.LogCritical(ex.StackTrace); | ||
return Ok(new { Success = false, Message = "The name is already in use" }); |
There was a problem hiding this comment.
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.
var result = service.GetAll(); | ||
return mapper.Map<IEnumerable<ProviderDTO>>(result).ToList(); | ||
} | ||
catch (Exception) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
Description
Creación de ProviderDTO , ProviderServices , ProviderController ,ProviderSearchDTO ,configuración en el Startup , Unit Testing
Issues
El único inconveniente que se me presentó fue con el método Create donde por adentro evalúa si hay un nombre repetido. Pero lo pude solucionar.
Ej:
Related to #(issue)
Fixes # (issue)
Opinion
Si querés dejar algún comentario al respecto: improvements, mistakes, weaknesses.