Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Summary

In this chapter you’ve seen many of the presumptions that Code First makes about what the model should look like based on what it sees in your classes. Strings become nvarchar(max) in SQL Server. Numbers acquire a precision that lets them have up to 18 digits (which will enable you to keep track of values in the quadrillions!) and 2 decimal places. While these and other defaults may be useful for very generic scenarios, you do have the ability to apply configurations to specify the sizes you prefer. You’ve also learned how to ensure that Entity Framework is aware that values should be treated as timestamps or at least concurrency fields. You’ve also worked with properties that point to complex types—types that do not have keys and can only be tracked when they are a property of another class that is tracked.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial