add EF implementation and API for cards