Implementing database layer with entity framework.