Read More than 5000 records in console app using paging and cookies in Dynamics 365

Normally when we read records from Dynamics 365 using console application it returns 5000 records but if you want to read more records then you have to use paging concept. you can use FetchXML or Query Expression to fetch data. use the below code to do it.