Automated the DB creation

Fixed the edmx problems