Structr
  • Welcome
  • Utilities
    • Abstractions
      • Check
      • Ensure
      • Money
      • HierarchyId
      • Providers
        • SequentialGuidProvider
      • Extensions
        • DateTime
        • Dictionary
        • DirectoryInfo
        • Enumerable
        • Enum
        • Expression
        • Int
        • Long
        • MemberInfo
        • Object
        • Queryable
        • ServiceCollection
        • String
        • Type
      • Helpers
        • AsyncHelper
        • BindHelper
      • JsonConverters
        • DateOnly
        • TimeOnly
        • StringNumber
    • Collections
      • AutoMapper extensions
    • IO
      • FileHelper
      • MimeTypeHelper
      • PathHelper
      • SequentialFileName
    • Configuration
      • Providers
        • JSON-file
        • XML-file
        • In-Memory
        • Consul
      • Get settings
      • Set settings
      • Customization
    • Email
      • Razor
    • Navigation
      • Menu
      • Breadcrumbs
    • Security
  • Domain
    • Domain
      • Entities
      • Value objects
  • Data Access
    • Entity Framework Core
    • Entity Framework 6
  • Use Cases
    • Operations
      • Filtering
      • Decoration
    • Notices
    • Validation
    • Specifications
    • Stateflows
      • StateMachine
      • Configurations
  • Presentation
    • ASP.NET Core
      • Client
      • Http
      • JavaScript
      • Json
      • Mvc
      • Referrer
      • Rewrite
      • Routing
      • TagHelpers
      • Validation
Powered by GitBook
On this page
  • Installation
  • Setup
  • Contents

Was this helpful?

Edit on GitHub
  1. Presentation

ASP.NET Core

PreviousConfigurationsNextClient

Last updated 2 years ago

Was this helpful?

Structr.AspNetCore package contains number of classes (including tag-helpers) and extension methods to supply wide range of developer basic needs in different situations of web-development.

Big part of package consists of extensions for controllers, HttpContext, etc., allowing to avoid redundant code in widespread cases.

Installation

AspNetCore package is available on .

dotnet add package Structr.AspNetCore

Setup

There are different ways to configure Structr.AspNetCore services and most common of them is adding:

services.AddAspNetCore();

This will add all tools described in section below. But if you need only some of tools then these extension methods for IServiceCollection could be used:

Method name
Return type
Description

AddClientAlerts

IServiceCollection

Add services assisting in transferring alerts from server side to client.

AddClientOptions

IServiceCollection

Add services assisting in passing data represented by dictionary via Microsoft.AspNetCore.Http.HttpContext.Items

AddActionContextAccessor

IServiceCollection

AddUrlHelper

IServiceCollection

Contents

  • - methods providing functionality for interacting with app's client-side;

  • - extension methods for http-related stuff such as HttpContext and HttpRequest;

  • - provides IActionResults and extension methods related to JavaScript and client-side things;

  • - JSON-related controller extensions and actions results;

  • - methods for working with ViewEngine and other common MVC stuff;

  • - provides tools for working with HTTP referer and other related things;

  • - extensions and IRule implementations related to modifying url;

  • - extensions and classes for working with routing;

  • .

Add service.

Add service.

NuGet
Client
Http
JavaScript
Json
Mvc
Referrer
Rewrite
Routing
TagHelpers
contents
IActionContextAccessor
Microsoft.AspNetCore.Mvc.IUrlHelper