• Stars
    star
    124
  • Rank 286,934 (Top 6 %)
  • Language
    C#
  • Created over 2 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A repository demonstrating functional techniques with C# 10 and the similarities between JavaScript, TypeScript, and C#.

Building up from JavaScript to TypeScript to C# 10 and .NET 6

This repository is meant to highlight some of the various functional techniques available in C#.

Read more here: https://chrlschn.medium.com/building-up-from-javascript-to-typescript-to-c-10-and-net-6-669a70cd0a66

JS vs TS vs CS

These functional elements of C# ultimately mean that there is quite a bit of syntactic congruence with JavaScript and TypeScript; in fact, I first noticed that C# and JavaScript starting to converge around the release of .NET 3.0.

For many developers that are ready to extend from JavaScript and TypeScript on the backend to a more secure, performant, and robust backend runtime, C# on .NET is a natural extension as it has a clear lineage with JavaScript and TypeScript while providing many benefits including easy mutli-threading, language integrated query (LINQ), and many other features.

If you'd like to learn more about C#'s functional features, check out:

If You'd Like to Contribute...

Make a fork and send a PR! I'd love to see folks add more examples.

(It may make sense to have sub-folders under ts, js, and csharp)

Running the JavaScript Sample

Install Node: https://nodejs.org/en/download/

To run the JavaScript sample:

cd js
node sample.js

To try the battleships sample:

cd js-battleships
node battleships.js

Running the TypeScript Sample

Install TypeScript: https://www.typescriptlang.org/download

To run the TypeScript sample:

cd ts
tsc
node sample.js

To try the battleships sample:

cd ts-battleships
tsc
node battleships.js

Running the C# Sample

Install the .NET SDK: https://dotnet.microsoft.com/en-us/download

To run the base C# sample:

cd cs
dotnet run

You can also try out the Battleships C# sample which is even more functional and demonstrates recursion with C# local functions:

cd cs-battleships
dotnet run

To create your own .NET console project once you have the SDK installed:

dotnet new console

More Repositories

1

coderev

CodeRev is a lightweight tool that helps teams conduct technical interviews using code reviews.
Vue
94
star
2

vue3-pinia-quasar-ts

A minimal template that hooks up Vue 3, Pinia (Vuex 5), Quasar, Vue Router 4, and TypeScript
Vue
76
star
3

dotnet6-openapi

An example of using .NET 6 Web APIs with client code generation
TypeScript
39
star
4

dn8-modular-monolith

A practical example of how to build modular monoliths ("momo") with .NET 8
C#
33
star
5

dn6-mongo-react-valtio

A fully featured sample .NET 6 Web API with MongoDB, React, and Valtio. Set up for Google Cloud Run for the back-end with a Dockerfile.
TypeScript
33
star
6

AzFunctionsJwtAuth

Skeleton code for performing authentication and authorization with custom schemes and JWT in Azure Functions
C#
14
star
7

playwright-scrape-api

A dead simple REST API to use Playwright to scrape the text contents from any URL.
Shell
14
star
8

covidcureid

CURE ID COVID Database App. This application extracts the COVID specific cases from the CURE ID database which contains novel case reports related to the treatment of acute SARS-CoV2 via off-label uses of drugs (at the time of treatment). While the database is small at only 1000 cases or so, it represents an alternate source of data captured world-wide which can provide inputs on alternate treatments based on available drugs on hand. The backend is written in C# for Azure using serverless Functions. The frontend is written in Vue.js + Quasar.
C#
12
star
9

dotnet6-jint-rules-engine

A JavaScript rules engine running in .NET 6 using the Jint library.
TypeScript
8
star
10

vue3-state-definemodel

A sample repository showing how to use defineModel in Vue 3.4 with composables to easily and cleanly manage state.
Vue
7
star
11

dn6-channels

A tutorial demonstrating usage of dotnet 6 channels for concurrent code.
C#
7
star
12

dn6-firebase

A repository which shows how to integrate dotnet6 with Google Cloud Firebase using the local emulator.
TypeScript
6
star
13

gcr-invoke-job-overrides

Repository showing how to invoke Google Cloud Run jobs with overrides which allow passing in runtime parameters.
C#
5
star
14

dn7-source-generators

A sample project that shows how to use .NET source generators to reduce boilerplate code.
C#
5
star
15

dn7-server-sent-events

A repository demonstrating Server Sent Events using .NET 7
C#
3
star
16

dn7-openapi-codegen

A repo demonstrating how to set up .NET 7 Web APIs with hot reload for TypeScript client generation.
TypeScript
3
star
17

react-valtio-example

Example showing React with valtio state management.
TypeScript
2
star
18

AzFunctionsGraphQL

A complete project showing how to incorporate GraphQL into Azure Functions
C#
2
star
19

gcr-dn6-api

Dockerfile
2
star
20

gcloud-pubsub-dotnet6

Sandbox project which shows how to use Google Cloud Pub/Sub with .NET 6. Check out the YouTube walkthrough.
C#
1
star
21

dn6-playwright-video-api

A .NET 6 Web API that supports generating video recordings of your web app using Playwright and FFMPEG.
C#
1
star
22

dn8-sk-llama3-fireworks

A repository demonstrating .NET 8 using Semantic Kernel to generate multiple streams of content using System.Threading.Channels with Llama 3 and Fireworks.ai
C#
1
star