Refactor for to seperate SQL server and Entity Framework