1

As an example, I have a POCO called Person which is used in my presentation layer and my business logic layer.

I don't want to use this POCO in the Entity framework because I don't want that class to contain database specific metadata such as those annotations used by the Entity framework.

Is there a naming convention to use in this case? Ideally, I would like the POCO to remain Person and its corresponding Entity to be called PersonEntity.

asked Jul 7, 2018 at 21:50
1
  • if you do code first carefully you can avoid the annotations Commented Jul 8, 2018 at 8:03

1 Answer 1

2
  1. There is no universal, or widely approved naming convention
  2. Since there are 3 application layers where the abstraction of Person is present, you may simply distinguish them by namespaces, although this appoach may lead to confusion
  3. In my opinion the most verbose approach would be the following:
    • Person - for domain/business logic layer
    • PersonEntity - for data access / entity framework layer
    • PersonViewModel - for presentation layer
answered Jul 8, 2018 at 8:09

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.