Click here to Skip to main content
15,887,464 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Need Suggestions For a Good Formal Requirements Tool Pin
Eddy Vluggen25-Aug-12 23:39
professionalEddy Vluggen25-Aug-12 23:39 
QuestionUI Guidelines Pin
Brian C Hart22-Aug-12 11:04
professionalBrian C Hart22-Aug-12 11:04 
AnswerRe: UI Guidelines PinPopular
Pete O'Hanlon22-Aug-12 11:29
mvePete O'Hanlon22-Aug-12 11:29 
QuestionUtility Field in Database Pin
eddieangel21-Aug-12 11:38
eddieangel21-Aug-12 11:38 
AnswerRe: Utility Field in Database Pin
Eddy Vluggen22-Aug-12 5:51
professionalEddy Vluggen22-Aug-12 5:51 
AnswerRe: Utility Field in Database Pin
Nagy Vilmos22-Aug-12 6:07
professionalNagy Vilmos22-Aug-12 6:07 
AnswerRe: Utility Field in Database Pin
BobJanova22-Aug-12 6:28
BobJanova22-Aug-12 6:28 
GeneralRe: Utility Field in Database Pin
eddieangel22-Aug-12 7:36
eddieangel22-Aug-12 7:36 
There is a parent - child relationship between claim and property. Every property does have a claimId already. So in theory when looking to get all claim information (with properties) I could write:

SQL
SELECT * FROM ClaimEvent
WHERE targetId = @ClaimId
OR targetId in (SELECT id FROM Property WHERE claimId = @ClaimId)


That would get all of the event dates that I need, I just don't like to have to use the IN query if I could avoid it. In actuallity this is going to be accessed through LinqToEF so it is going look more like:

C#
var propertyIds = _db.Properties.Where(p => p.claimId == _claim.id).Select(p => p.id);
ObservableCollection<Property> claimEvents =
                new ObservableCollection<ClaimEvent>(_db.ClaimEvents
                    .Where(c => propertyIds
                        .Contains(p.claimId) || c.claimId == _claim.id));


If the table had claimId and propertyId it would look like this:

C#
ObservableCollection<ClaimEvent> claims = _db.ClaimEvents.Where(c => c.claimId == _claimId);


I don't really think I like the additional overhead of the subquery (In this case the addition of var propertyIds due to L2EF limitations). Anyways, thanks everyone for your input, I am going to go ahead and add the propertyId field to the ClaimEvent table. I suppose I could go so far as to have ClaimEvent for Claim specific events and PropertyEvent for property specific events, and I might end up doing that, though it irks me to add yet another table.
GeneralRe: Utility Field in Database Pin
jschell22-Aug-12 8:55
jschell22-Aug-12 8:55 
GeneralRe: Utility Field in Database Pin
eddieangel22-Aug-12 9:00
eddieangel22-Aug-12 9:00 
GeneralRe: Utility Field in Database Pin
jschell22-Aug-12 13:24
jschell22-Aug-12 13:24 
GeneralRe: Utility Field in Database Pin
eddieangel22-Aug-12 13:26
eddieangel22-Aug-12 13:26 
GeneralRe: Utility Field in Database Pin
jschell23-Aug-12 8:12
jschell23-Aug-12 8:12 
GeneralRe: Utility Field in Database Pin
eddieangel23-Aug-12 8:23
eddieangel23-Aug-12 8:23 
GeneralRe: Utility Field in Database Pin
jschell23-Aug-12 8:57
jschell23-Aug-12 8:57 
GeneralRe: Utility Field in Database Pin
eddieangel23-Aug-12 9:01
eddieangel23-Aug-12 9:01 
GeneralRe: Utility Field in Database Pin
jschell24-Aug-12 8:28
jschell24-Aug-12 8:28 
GeneralRe: Utility Field in Database Pin
eddieangel24-Aug-12 8:31
eddieangel24-Aug-12 8:31 
QuestionStandard exceptions for an RPC library? Pin
axpnumtheory16-Aug-12 19:43
axpnumtheory16-Aug-12 19:43 
AnswerRe: Standard exceptions for an RPC library? Pin
Eddy Vluggen16-Aug-12 22:30
professionalEddy Vluggen16-Aug-12 22:30 
GeneralRe: Standard exceptions for an RPC library? Pin
axpnumtheory17-Aug-12 7:09
axpnumtheory17-Aug-12 7:09 
AnswerRe: Standard exceptions for an RPC library? Pin
Eddy Vluggen17-Aug-12 8:20
professionalEddy Vluggen17-Aug-12 8:20 
GeneralRe: Standard exceptions for an RPC library? Pin
axpnumtheory17-Aug-12 10:03
axpnumtheory17-Aug-12 10:03 
GeneralRe: Standard exceptions for an RPC library? Pin
Richard MacCutchan17-Aug-12 22:14
mveRichard MacCutchan17-Aug-12 22:14 
GeneralRe: Standard exceptions for an RPC library? Pin
axpnumtheory18-Aug-12 7:21
axpnumtheory18-Aug-12 7:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.