Skip to main content

Constraints, Keys, and Relationships

  • Chapter
  • First Online:
Practical Entity Framework
  • 749 Accesses

Abstract

In this chapter, we are going to learn about how we can use data annotations to further constrain our database structures from code. In addition, we’ll look at how we can easily build out some relationships in our models that translate directly into relationships in the database.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Brian L. Gorman

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Gorman, B.L. (2020). Constraints, Keys, and Relationships. In: Practical Entity Framework. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-6044-9_5

Download citation

Publish with us

Policies and ethics