Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COOkay, I'm familiar with SRP. So, you are suggesting a whole separate set of small classes (one-to-one) to provide a layer of separation? Sounds fair, even if it creates a whole slew of "mirror" classes. Though don't I end up with the very same problem enforcing a static factory method on those classes? I'm a little unclear about your non-static suggestion... how a non-static solution would look.
      singulars
    2. COIt might be a one-to-one between entity and mapper. There are a lot of common solutions to this captured in things like Patterns of Enterprise Application Architecture (PEAA). In a Table Data Gateway (for example) you could have an XEntityGateway. An instance of that would be created to save or load an XEntity. Each entity would follow the same pattern. When they are interface-driven instances instead of static, it will be much easier to test your system because you'll be able to mock out this data layer during unit testing.
      singulars
    3. COI think I'm following you as saying create another data access layer (DAL) for XML persistence that communicates with the entities as a repository only (which I think is the proper way of doing EF)? Keep in mind this is just a personal application--I like doing things "right" and want to learn, but probably won't be mocking and testing. A simple, but correct architecture is what I'm looking for along with learning a good practice pattern.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload