apply entity framework