This paper presents a demand response (DR) framework that intertwines thermodynamic building models with a genetic algorithm (GA)-based optimization method. The framework optimizes heating/cooling schedules of end-users inside a business park microgrid with local distributed generation from renewable energy sources (DG-RES) based on two separate objectives: net load minimization and electricity cost minimization. DG-RES is treated as a curtailable resource in anticipation of future scenarios where the infeed of DG-RES to the regional distribution network could be limited. We test the DR framework with a case study of a refrigerated warehouse and an office building located in a business park with local PV generation. Results show the technical potential of the DR framework in harnessing the flexibility of the thermal masses from end-user sites in order to: (1) reduce the energy exchange at the point of connection; (2) reduce the cost of electricity for the microgrid end-users; and (3) increase the local utilization of DG-RES in cases where DG-RES exports to the grid are restricted. The results of this work can aid end-users and distribution network operators to reduce energy costs and energy consumption.