An open API service indexing awesome lists of open source software.

https://github.com/codecapital/codecapital.aspnetcore


https://github.com/codecapital/codecapital.aspnetcore

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# CodeCapital.AspNetCore

ASP.NET Core libraries.

[![.NET](https://github.com/codecapital/CodeCapital.AspNetCore/actions/workflows/dotnet.yml/badge.svg)](https://github.com/codecapital/CodeCapital.AspNetCore/actions/workflows/dotnet.yml)

CodeCapital.AspNetCore.Mvc.TagHelpers

[![NuGet](https://img.shields.io/nuget/v/CodeCapital.AspNetCore.Mvc.TagHelpers.svg?style=flat-square&label=nuget)](https://www.nuget.org/packages/CodeCapital.AspNetCore.Mvc.TagHelpers)

- Json Flattener
- Tag Helpers
- asp-class
- asp-if \[negate\]
- Razor to String Renderer
- Configuration in ASP.NET Core
- AddRemoteJsonFile(url)
- Services
- MailGun
- ReCaptcha v2
- RazorLibrary
- Calendar (blazor)
- Table (blazor, with column sorting)

## Json Flattener
*Namespace: CodeCapital.System.Text.Json*

This library flattens json string into
```List```.

```c#
var flattener = new JsonFlattener();
var list = flattener.Flatten(json);
```

## ASP.NET Core TagHelpers
*Namespace: CodeCapital.AspNetCore.Mvc.TagHelpers*

### Conditional Add Class (asp-class-something="")

ASP.NET Core
```aspnet

Hello, World!


```
HTML (If a condition is true, a class attribute is added to html tag)
```html

Hello, World!


```

### If Condition (asp-if="", <asp-if></asp-if> )

ASP.NET Core
```aspnet

Hello, World!

Hello, World!


```
HTML (If a condition is true)
```html

Hello, World!


```
#### Negate
ASP.NET Core
```aspnet

Hello, World!

Hello, World!


```
HTML (If a condition is true, nothing renders.)
```html
```

## References
https://stackoverflow.com/questions/58512542/read-a-json-file-and-generate-string-keys-with-values-in-a-dictionary-like-objec
https://stackoverflow.com/questions/7394551/c-sharp-flattening-json-structure