public async Task <IHttpActionResult> GetById(int id) { var memory = await memoryService.GetById(id); if (memory == null) { return(NotFound()); } var memoryDTO = mapper.Map <MemoryDTO>(memory); return(Ok(memoryDTO)); }