Adding database persistence

All of the code examples we have explored so far have used in-memory data stores that are recreated each time the application restarts. It is now time to add support for database persistence so we can progress the main application example towards a production-ready status. We also need to prepare for the next chapter; it will cover testing-related topics that need the database persistence functionality to be in place.

The ServiceStack framework comes with built-in functionality for lightweight ORM functionality in the ServiceStack.OrmLite library. There are established ORM libraries and frameworks, such as Entity Framework and NHibernate, that provide mapping between the .NET type system and relational database objects. ...

Get Learning AngularJS for .NET Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.