M
moo
I'm a newbie to LINQ who's trying to use/learn it on a project, though
my use-case seems different from normal Google queries on LINQ (LINQG,
I'm sure it'll be out in 2011).
I have a data model where a Person has an M:N relationship with Phone
(many people from the same office may share a number, one person may
have cell, office, home, etc) in my database.
Person
+personID
firstName
lastName
email
PersonPhone
personID
phoneID
Phone
phoneID
phoneNumber
I've generated a view in the back-end that selects columns from
various tables in order to simplify processing insertions from an
input Excel file. This file has columns that correspond to home phone
and office phone.
I'm not sure whether I should try to modify the view within the DB
structure to try to get another phone number column, or modify the
LINQ dbml by adding an property to the generated View class in the
code. The modified class seems easiest (though then the LINQ doesn't
directly respond to the underlying data model), where I could create
an property phoneNumber2 who's SQL does an insert into the phone
table. I'm not sure how to wire that up though. Any suggestions?
my use-case seems different from normal Google queries on LINQ (LINQG,
I'm sure it'll be out in 2011).
I have a data model where a Person has an M:N relationship with Phone
(many people from the same office may share a number, one person may
have cell, office, home, etc) in my database.
Person
+personID
firstName
lastName
PersonPhone
personID
phoneID
Phone
phoneID
phoneNumber
I've generated a view in the back-end that selects columns from
various tables in order to simplify processing insertions from an
input Excel file. This file has columns that correspond to home phone
and office phone.
I'm not sure whether I should try to modify the view within the DB
structure to try to get another phone number column, or modify the
LINQ dbml by adding an property to the generated View class in the
code. The modified class seems easiest (though then the LINQ doesn't
directly respond to the underlying data model), where I could create
an property phoneNumber2 who's SQL does an insert into the phone
table. I'm not sure how to wire that up though. Any suggestions?