troubleshooting Question

How best to represent and model data

Avatar of Andy Green
Andy GreenFlag for United Kingdom of Great Britain and Northern Ireland asked on
ASP.NET* Entity Framework Core* ASP.NET Core
3 Comments1 Solution18 ViewsLast Modified:
Hi

Using EF Core I'm struggling how to model data. I'm also new to EF so bear with me.

We are storing personnel data thats changed, so some fields will be strings like name, some will be objects (Value Objects) like addresses, boolean flag values and dates. We need to try to keep the correct data type for type saftey, only a very limited subset of the data will be stored.

As you can see we have every kind of data to persist.

I'm struggling how to even model this using a data first approach let alone EF.

I'm kinda leaning towards saving everything as strings and use code inthe domain layer to check / maintain type safety, but value objects like address still present a problem, do I have a single row for all proprties or a separate row with a key and 1 property per row?

Not all data will be relavent or persisted per person, for example 1 person might update their name, another their address and another their marketing preferences, these need to be stored temporarily until approved when the master record will be updated.

Does anyone get what I'm after and any pointers on how to get going.

Andy
ASKER CERTIFIED SOLUTION
Andy Green

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros