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.
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.
Post Details
- Posted
- 9 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/dotnet/comm...