public async Task <List <PathModel> > GetAllPaths() { List <Path> paths = await _pathRepository.GetAllPaths(); //if (paths == null) //{ // return null; //} return(_mapper.Map <List <PathModel> >(paths)); }