public virtual async Task <IActionResult> Get(int id) { try { var result = await reader.Get(id); if (result == null) { return(NotFound(new NotFoundException())); } else { return(Ok(result)); } } catch (Exception ex) { return(ErrorRetrieving(ex.StackTrace)); } }
public async Task Delete(int id) { var entity = await _reader.Get(id); await Delete(entity as T); }