frederic2ec / inertia-aspnetcore

A simple implementation of InertiaJS for ASP.Net Core

Home Page:https://inertiajs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

image

Inertia.js ASP.Net Core Adapter

Prerequisite

  1. .NET Core v5 and later
  2. An ASP.NET Core MVC project

Install

  1. Package Manager: PM> Install-Package Inertia.AspNetCore
  2. .NET CLI: dotnet add package Inertia.AspNetCore

Usage

  1. Setup Startup.cs
using Inertia.AspNetCore;

public void ConfigureServices(IServiceCollection services)
{
    services.AddControllersWithViews().AddInertia();
}
  1. In your controller
using Inertia.AspNetCore;

public class HomeController : InertiaController {
    public IActionResult Index()
    {
       return Inertia("Index", new
       {
           UserId = 1
       });
    }
}

Visit inertiajs.com to learn more.

About

A simple implementation of InertiaJS for ASP.Net Core

https://inertiajs.com/

License:MIT License


Languages

Language:C# 98.9%Language:HTML 1.1%