Mise à jour de 'EntityFramework_LoL/Sources/ApiMappeur/ChampionMapper.cs'
continuous-integration/drone/push Build is failing Details

master
David D'ALMEIDA 2 years ago
parent 5b5fbc4e29
commit 9707d2ce23

@ -9,13 +9,7 @@ namespace ApiMappeur
public static ChampionDTO ToDTO(this Champion item)
{
/*if (item == null)
{
var message = string.Format("Champion cannot be empty");
*//*throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, message));
*//*
throw new Exception(message);
}*/
return new ChampionDTO()
{
Icon = item.Icon,
@ -40,9 +34,8 @@ namespace ApiMappeur
{
if (item == null)
{
var message = string.Format("Champion with name = {} not found", item.Name);
/*throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, message));
*/
var message = string.Format("Champion is null cannot null it ";
throw new Exception(message);
}
@ -66,8 +59,6 @@ namespace ApiMappeur
if (dto == null)
{
var message = string.Format("Champion cannot be empty");
/*throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, message));
*/
throw new Exception(message);
}

Loading…
Cancel
Save