YAFNET.RazorPages
4.0.0-rc02
See the version list below for details.
dotnet add package YAFNET.RazorPages --version 4.0.0-rc02
NuGet\Install-Package YAFNET.RazorPages -Version 4.0.0-rc02
<PackageReference Include="YAFNET.RazorPages" Version="4.0.0-rc02" />
paket add YAFNET.RazorPages --version 4.0.0-rc02
#r "nuget: YAFNET.RazorPages, 4.0.0-rc02"
// Install YAFNET.RazorPages as a Cake Addin #addin nuget:?package=YAFNET.RazorPages&version=4.0.0-rc02&prerelease // Install YAFNET.RazorPages as a Cake Tool #tool nuget:?package=YAFNET.RazorPages&version=4.0.0-rc02&prerelease
YAF.NET Razor Pages Client Library
Prerequisites:
- ASP.NET Core 8.0 (YAF v4.x)
Quick Guide
Add the YAF Nuget Packages
- Install the YAFNET.RazorPages Package via Nuget Browser or the console
> dotnet add package YAFNET.RazorPages
- Depending on which Data Provider you want top use add the package ..
YAFNET.Data.SqlServer Package via Nuget Browser or the console
> dotnet add package YAFNET.Data.SqlServer
YAF.Data.MySQL Package via Nuget Browser or the console
> dotnet add package YAFNET.Data.MySQL
YAFNET.Data.PostgreSQL Package via Nuget Browser or the console
> dotnet add package YAFNET.Data.PostgreSQL
YAFNET.Data.Sqlite Package via Nuget Browser or the console
> dotnet add package YAFNET.Data.Sqlite
Getting Started
Program.cs
In the Program.cs
add UseAutofacServiceProviderFactory
and ConfigureYafLogging
to the IHostBuilder
.
var host = Host.CreateDefaultBuilder(args).UseAutofacServiceProviderFactory()
.ConfigureYafLogging()
.ConfigureWebHostDefaults(webHostBuilder => webHostBuilder.UseStartup<Startup>()).Build();
return host.RunAsync();
Startup.cs
You add the YAF.NET services and the YAF.NET UI in the Startup.cs of your application.
public void ConfigureServices(IServiceCollection services)
{
...
services.AddRazorPages(options =>
{
options.Conventions.AddPageRoute("/SiteMap", "Sitemap.xml");
}).AddYafRazorPages(this.Environment);
services.AddYafCore(this.Configuration);
...
}
/// <summary>
/// Configures the container.
/// </summary>
/// <param name="builder">The builder.</param>
public void ConfigureContainer(ContainerBuilder builder)
{
builder.RegisterYafModules();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.RegisterAutofac();
app.UseAntiXssMiddleware();
app.UseStaticFiles();
app.UseSession();
app.UseYafCore(this.ServiceLocator, env);
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
endpoints.MapAreaControllerRoute(
name: "default",
areaName:"Forums",
pattern: "{controller=Home}/{action=Index}/{id?}");
endpoints.MapControllers();
endpoints.MapYafHubs();
});
...
}
Now the Forum is ready and you can add a link to your _Layout.cshtml
<li class="nav-item">
<a class="nav-link" asp-area="Forums" asp-page="/Index">Forums</a>
</li>
Community Support Forum
See a real live YAF Forum by visiting the YetAnotherForum.NET community support forum: https://forum.yetanotherforum.net. Also, get your questions answered by the YAF community.
License
Yet Another Forum.NET is licensed under the Apache 2.0 license.
Yet Another Forum Community Support
If you have any questions, please visit the YAF Community Support forum: https://forum.yetanotherforum.net, or visit the Wiki for More Informations.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
-
net8.0
- Microsoft.AspNetCore.Authentication.Facebook (>= 8.0.6)
- Microsoft.AspNetCore.Authentication.Google (>= 8.0.6)
- Microsoft.Extensions.FileProviders.Embedded (>= 8.0.6)
- YAFNET.Core (>= 4.0.0-rc02)
- YAFNET.Types (>= 4.0.0-rc02)
- YAFNET.Web (>= 4.0.0-rc02)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
4.0.0-rc04 | 61 | 11/17/2024 |
4.0.0-rc03 | 336 | 7/6/2024 |
4.0.0-rc02 | 146 | 5/29/2024 |
4.0.0-rc01 | 82 | 5/29/2024 |
4.0.0-beta09 | 74 | 5/18/2024 |
4.0.0-beta07 | 126 | 3/28/2024 |
4.0.0-beta05 | 113 | 2/28/2024 |