Using Nerd Dinner as an example:
private NerdDinnerDataContext db = new NerdDinnerDataContext();
public IQueryable<Dinner> FindAllDinners()
{
return db.Dinners;
}
Is it not bad practice to directly expose the entity class Dinner
here? I think it is better for the repository to return an IDinner
.
So my question is, how can I make the auto-generated entity classes expose my interface?