Do I need to include all fields in my entity framework model
Posted
by Jim B
on Stack Overflow
See other posts from Stack Overflow
or by Jim B
Published on 2010-04-23T12:51:23Z
Indexed on
2010/04/23
12:53 UTC
Read the original article
Hit count: 237
Quick question for everyone:
Do I need to include all the database table fields on my EF model?
For example; I've created a sub-model that only deals with tblPayment and associated tables. Now, I need to write a LINQ query to get some information about items. I would typically get this by joining tblPayment to tblInvoice to tblInvoiceItem to finally tblOrderItem.
I'm wondering if when I add in those other tables, do I need to include all the fields for tblInvoice and tblInvoiceItem? Ideally; I'd just like to keep the fields I'd need to join on, as that would limit the possibility of my sub-model breaking if other fields on those tables are modified/deleted.
Can I do this?
© Stack Overflow or respective owner