Datasilk.Core.Mvc 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Datasilk.Core.Mvc --version 1.0.0
                    
NuGet\Install-Package Datasilk.Core.Mvc -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Datasilk.Core.Mvc" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Datasilk.Core.Mvc" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Datasilk.Core.Mvc" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Datasilk.Core.Mvc --version 1.0.0
                    
#r "nuget: Datasilk.Core.Mvc, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Datasilk.Core.Mvc@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Datasilk.Core.Mvc&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Datasilk.Core.Mvc&version=1.0.0
                    
Install as a Cake Tool

Datasilk Logo

Datasilk Core MVC

An MVC Framework for ASP.NET Core

Datasilk Core is an ultra-fast, light-weight alternative to ASP.NET Core MVC 5 that supports HTML scaffolding and simple web services.

Instead of managing a complex ASP.NET Core web application and all of its configuration, simply include this framework within your own ASP.NET Core Web Application project and start building your website!

Startup.cs

Make sure to include the middelware within your Startup class Configure method.

app.UseDatasilkMvc(new MvcOptions()
{
	IgnoreRequestBodySize = true,
	WriteDebugInfoToConsole = true,
	Routes = new Routes()
});

Page Requests

All page request URLs are mapped to controllers that inherit the Datasilk.Core.Web.IController interface. For example, the URL http://localhost:7770/products would map to the class MyProject.Controllers.Products.

/Views/Home/home.html

<div class="hero">
	<h1>{{title}}</h1>
	<h3>{{description}}</h3>
</div>

/Controllers/Home.cs

namespace MyProject.Controllers
{
    public class Home: Datasilk.Core.Web.Controller
    {
        public override string Render(string body = "")
		{
			//render page
			var view = new View("/Views/Home/home.html");
			view["title"] = "Welcome";
			view["description"] = "I like to write software";
			AddScript("/js/views/home/home.js");
			return view.Render();		
		}
	}
}

Web Services

The Datasilk Core MVC framework comes with the ability to call RESTful web APIs. All web API calls are executed from Datasilk.Core.Web.IService interfaces.

Example
namespace MyProject.Services
{
    public class User: Datasilk.Core.Web.Service
    {
		[POST]
		public string Authenticate(string email, string password)
		{
			//authenticate user
			if(Authenticated(email, password)){
				return Success();
			}else{
				return AccessDenied("Incorrect email and/or password");
			}
		}
	}
}

Read more Documentation on Github

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 is compatible.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Datasilk.Core.Mvc:

Package Downloads
Saber.Core

Core MVC classes & interfaces used in the Saber website builder.

Kandu.Core

The core interfaces, classes, and middleware for Kandu, used by plugin developers.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.8.2 706 3/26/2023
1.0.8.1 238 3/20/2023
1.0.8 849 11/18/2022
1.0.7.9 456 7/21/2022
1.0.7.8 497 3/4/2022
1.0.7.7 467 2/23/2022
1.0.7.6 499 11/28/2021
1.0.7.5 523 11/3/2021
1.0.7.4 411 11/3/2021
1.0.7.3 329 11/2/2021
1.0.7.2 334 11/2/2021
1.0.7.1 396 10/17/2021
1.0.7 1,184 3/14/2021
1.0.6.5 460 12/10/2020
1.0.6.4 461 12/10/2020
1.0.6.3 557 11/24/2020
1.0.6.2 663 11/14/2020
1.0.6 585 11/12/2020
1.0.5.2 540 11/12/2020
1.0.5 676 11/10/2020
1.0.4.2 1,291 11/6/2020
1.0.4.1 476 11/6/2020
1.0.4 473 11/6/2020
1.0.3 494 9/29/2020
1.0.2 587 11/9/2019
1.0.1 561 11/9/2019
1.0.0 564 11/9/2019

This is the first official release of Datasilk Core MVC. After using this MVC framework in various projects over the past 3 years, I've made the effort to publish a stable release to Nuget.