Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active July 29, 2016 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gistlyn/1cf99946dd378c7d7ad678d052c29d38 to your computer and use it in GitHub Desktop.
Save gistlyn/1cf99946dd378c7d7ad678d052c29d38 to your computer and use it in GitHub Desktop.
OrmLite CREATE Table Examples

CREATE Table Examples

As a code-first ORM, creating tables is effortless in OrmLite that uses your POCO Type definition to generate RDBMS Table schemas that cleanly maps .NET data types 1:1 to the most appropriate RDBMS column definition:

OrmLite also supports persisting rich complex types which are blobbed by default or you can use the [Reference] support to persist Nested Complex Types in their own Table Definitions:

When needed you can markup your POCO's with .NET Attributes to allow further specialization of your Table schema and unlock RDBMS server features:

A popular use-case where you'd want to use Attributes is to define Foreign Keys:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment