public static Serie Get(int id) { if (id <= 0) { throw new MediaManagerException($"Erreur : {nameof(id)} <= 0", ExceptionReturnType.Error); } try { Serie result; using (var context = new MediaManagerContext()) using (var repository = new SerieRepository(context)) { result = repository.Get(id); } return(result); } catch (Exception ex) { throw new MediaManagerException($"Erreur : {ex.Message}", ExceptionReturnType.Error); } }