using DTO; using Model; namespace API_LoL_Project.Mapper { public static class RuneMapper { public static RuneDTO ToDTO(this Rune item) { return new RuneDTO() { Name = item.Name, Family = item.Family, }; } public static Rune ToModel(this RuneDTO dto) { /*if (dto == null) { *//* var message = string.Format("Champion with name = {} not found", dto.Name); throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, message));*//* }*/ return new Rune(dto.Name, dto.Family); } } }