Entity framework now is used for  writing history to to database