Optimize the detail context model defination;