Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Entity Framework - problem creating sufficient model for Emails
Post Body

Hello,

I am working on WCF service for sending emails. The problem I have is to how design data model (I am using Entity Framework) that would work best.

The problem is mostly CC and BCC collections of email addresses (defined as virtual ICollection<EmalAddress>). Entity Framework wants to store them in another table (which is fine), but I would like avoid duplication. Since sender will probably be most of the time same. Right now I am using email address as primary key, but once I add another email with same sender, I got problem because primary key is not unique.

How to solve this? I have read fair amount of stuff about EF but did not find good way. I can save email address class with unique IDs, but there will be tons unnecessary duplicity.

Also to avoid further complications, I have separate classes to represent email entity and data contract for WCF. It is good way, or should I merge them together? (they are basically identical)

Thanks for help.

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
5,086
Link Karma
3,970
Comment Karma
1,116
Profile updated: 1 month ago
Posts updated: 11 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
9 years ago