Quick start guide: C# ASP.NET
Use these guides to quickly connect a C# ASP.NET Core application to Optimizely Graph and retrieve Content Management System (CMS) content through a Web API.
Connect a C# ASP.NET Core application to Optimizely Graph and retrieve Optimizely CMS 12 content through a Web API. This hub article links to two end-to-end quick starts: a lightweight manual GraphQL client and the recommended StrawberryShake-based integration. Pick the approach that matches the project size, type-safety needs, and tolerance for hand-written serialization code.
Choose an approach based on the project needs.
- Build an ASP.NET Core API (manual GraphQL client) – A lightweight configuration with minimal tooling and full control over the GraphQL queries and response models. Suits small projects, prototypes, or learning how GraphQL requests work.
- Build an ASP.NET Core API using StrawberryShake (recommended) – A production-ready integration with strongly typed queries, automatic client generation, and compile-time validation. Reduces manual mapping code and improves maintainability for larger applications.
Prerequisites
Complete the following before starting either quick start. The same requirements apply to both approaches.
- Install the .NET 8 SDK.
- Verify access to an Optimizely Graph endpoint.
- Obtain a valid Graph authentication URL.
Updated 9 days ago
