In-Memory Provider

LightNap supports an in-memory database provider for development, testing, and rapid prototyping.

Configuration

Update appsettings.json:

{
  "Database": {
    "Provider": "InMemory"
  }
}

No connection string is required.

Usage

  • Data is lost when the application restarts
  • Perfect for unit testing and integration tests
  • Fast startup with no external dependencies
  • Useful for development and prototyping

Best Practices

  • Use for automated testing
  • Ideal for CI/CD pipelines
  • Great for feature development before database design
  • Not suitable for production or data persistence needs