Fixed an EF issue of sql 2000 compatibility.