diff --git a/EntityFramework_LoL/Sources/ApiMappeur/ChampionMapper.cs b/EntityFramework_LoL/Sources/ApiMappeur/ChampionMapper.cs index a5ff45a..af8d76e 100644 --- a/EntityFramework_LoL/Sources/ApiMappeur/ChampionMapper.cs +++ b/EntityFramework_LoL/Sources/ApiMappeur/ChampionMapper.cs @@ -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); }