Updated SQL/entity framework