Book Image

ServiceStack 4 Cookbook

Book Image

ServiceStack 4 Cookbook

Overview of this book

Table of Contents (18 chapters)
ServiceStack 4 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using and accessing OrmLite


When writing applications for the Web, it's almost inevitable that some kind of persistence of data will be required. Object-relational mapping is a technique that enables us to handle tables, columns, and rows and match them to objects in your application. There are many ORM frameworks in .NET, such as Entity Framework, Lightspeed, NHibernate, and others. ServiceStack has its own ORM framework that follows a lot of the same design principles as the rest of the stack: simplicity and performance. OrmLite is really fast, simple, and supports many of the most popular database technologies, but it is different than the others listed as it is what's known as a micro ORM framework.

OrmLite doesn't try to solve all data-access problems in one framework, which makes the others complicated and sometimes hard to use, but it does make the most common tasks simple and fast. In this recipe, we will have a look at a simple use case to show how we can use and access OrmLite...