https://github.com/codecapital/codecapital.aspnetcore
https://github.com/codecapital/codecapital.aspnetcore
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/codecapital/codecapital.aspnetcore
- Owner: codecapital
- License: mit
- Created: 2021-02-23T22:01:50.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-16T02:10:39.000Z (over 1 year ago)
- Last Synced: 2025-05-31T23:16:49.257Z (about 1 year ago)
- Language: C#
- Size: 180 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CodeCapital.AspNetCore
ASP.NET Core libraries.
[](https://github.com/codecapital/CodeCapital.AspNetCore/actions/workflows/dotnet.yml)
CodeCapital.AspNetCore.Mvc.TagHelpers
[](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