fabiochiu/medium-articles huggingface dataset:
I am sorry Dad, I am a Dad now
By: Dipesh Sukhani
Tags: Parenting, Dads, Growing Up

I am sorry Dad. I grew up.

I am sorry Dad. I transitioned from a boy to a Man.

I am sorry Dad. I got a job.

I now live in a different country.

I now have a family.

Dad, I am sorry.

The Plan

It was all part of the plan. The plan that all of us (yes, each one of us) devised and continued with.

You brought me into this plan. Since I first held your hand, till the last time I hugged you, when we met. You wanted me to be a part of this. All my friends have also been a part of this plan. Most of them are playing the roles that they were assigned.

As per the plan, I found someone whom I fell in love with. I married her and now, I have a beautiful son. Now, I am a Dad.

My turn to play

The world says it is now my turn. My turn to play the role that you played.

But I DO NOT!! NO, I DO NOT want to play the role.

I DO NOT want to be hurt. Yes, I realize how this plan is only designed to hurt me back, as much as I now see the pain in you.

While I sit with each of these questions today, I ask them to you too:

Did you want me to grow up?

© Liz Coderre: Baby Hugging Father

Cause I DO NOT want your grandson to. I want him to be the baby that he is. I want him to fight with me for my love and kiss. I want to put him to sleep in my arms every single night. I want him to not know the alphabet or the numbers.

Did you want me to be independent?

Cause I want to always keep hearing “papa, please help”. I want to give him a bath each day. I want to fix his toys every time he breaks.

Did you want me to be a man:

— where I can see you less,

— where I find it tough to say that I love you,

— where I find it tough to hug you

Cause I DO NOT want him to be a man and hold the grudges that I hold.

Cause I DO NOT.

Yet with all of this I wonder how can I be at peace, cause I want him to be happy too. With time, yes he will grow up, but if growing up leads to growing apart, I am afraid, I want to hold the clock still.

I wonder how you did it. How you kept your heart at bay and let me walk away; let me ride my own bicycle; let me go through life. How?

I am sorry Dad. I am not sure if I can be any good as you.

I am sorry Dad; I now realize when I am a Dad too.
My Sky Over The Years
By: Rochelle Silva
Tags: Nature, Sky, Growing Up, Poetry, Imagination

I sang of the star which was,

“Up above the world so high,

Like a diamond in the sky”.

And of homes on the range,

“Where the skies are not cloudy all day”.

Wrote about “Uncle Sun” with his smiling face,

Who brought day and night without fail.

Beheld the joy of flying a kite,

On August days with smiles bright.

Shouted with joy at rainbows,

And thought that clouds formed shapes galore.

Over the years, my sky changed too,

And became my stratosphere,

And the place for the ozone layer,

Or Orion and the Big Dipper.

But no matter how old I grow,

I’ll always be thankful,

To the beautiful sky,

That is always there,

For all of us,

And wish with all my heart,

“Oh! May I always laugh and sing,

Beneath God’s clear blue sky”
Getting past Losses
Tags: Loss, Growing Up, Death, Covid 19, Moving On

When I moved into my new house the summer of 2012 I was 8 years old. It was a rundown house and took me away from the family I knew. Just mom, dad, my little brother and I. A year later my mom found out I was going to have a little sister. My grandmother came up to watch us since I was 9 and couldn’t watch my brother and I. I never was close with her instead had a deep dislike towards her. She just didn’t understand how things were done. I was 9 and know how to run a household. She was there to drive us to the hospital to see mom and my sister, see we get home from school, and that I didn’t burn the house down.

Then a couple years later my mom had another boy in 2016. Now of course guess who was coming up again. When I was 9 I didn’t know my next door neighbor yet. I was 11 about to turn 12 the same year my new brother was born. It was late winter and in a matter of 2 months I’ll be 12. So I was having a hard time at home and my dad brought me over to meet them for the first time. I grew close to them. Mostly the elderly women rather than her husband. She was nice and taught me how to knit. Over time I found that I enjoyed it quite a lot.

So I went there often to keep learning and get more and new yarn. The more I went, the more I learned how her husband, who was 52 years old was battling cancer that has formed in his brain. Like my great-grandfather, he was always on the couch watching some kind of TV and never watched what I wanted unless he was still in bed. Unlike my great-grandfather, he got up and moved around a lot more and wasn’t overweight like him. He use to go snowmobiling and worked his tractor and other things to keep his home going. The home he lived in and built himself for 20 years before he finally passed.

In 2018 the day after Christmas he was rushed to the hospital in crucial condition. My mom who went to nursing school and worked in the nursing home at the time knew he wasn’t going to make it. My dad who doesn’t want to believe in death of someone he’s close with, looked at the brighter side and got angry or really upset otherwise. He died on January 6, 2019(sad to say I also look at this date as the day my boyfriend asked me out a year later so it’s a bittersweet date to me). We had his burial on May 5, 2019. Which was the only timed I cried at his death.
Too Late? But Our Life is Only Starting
Tags: Students, Hobby, Growing Up, Life

I want to play piano because my grandma loves when I play, even though I can only play third grade songs. It’s too late anyway, but I feel bad because I’d like to play a full piece for her.

That was something one of my friends said, almost as an offhand comment. I tend to hear snippets of something similar when my friends say they want to start doing something.

“Too late.”

But we aren’t seventy year old people, and even then, it’s not too late. There is still so much time. So how come everyone is saying that it’s too late to start?

The term most likely comes from comparison. Of course you would feel discouraged if a five-year-old played a ten minute long piece on the piano, without flinching, and you were ten years older, unable to play Twinkle Twinkle Little Star. Who wouldn’t?

But you probably haven’t put in as many hours of practice and effort. How is it fair to yourself to hold yourself to a similar standard when everyone’s lives are completely different?

Another part of growing up that I’ve noticed is how a hobby, preferably several hobbies, seems like a requirement. Ever since we were younger, we have always been asked “What do you do as a hobby?” as an icebreaker question at school, in clubs, etc. It makes it sound as if we should have a hobby that we developed when we were younger that we stuck with for five, six, seven years.

What if we don’t have a hobby? What if we’re still working out what exactly we are passionate about?

Also, “watching TV,” “watching Netflix,” “playing video games,” etc. isn’t seen by most people as a “productive hobby.” Students that enjoy these kinds of activities scramble to find a “real” hobby when the icebreaker question is thrown at them.

And as we grow older, we physically have less time to spare because we have more responsibilities. But the lack of time isn’t the main problem.

Even my sister was reluctant to start something new. “It won’t matter, I didn’t start it early enough anyway.” And she was only in fifth grade.

Eventually, she gave in and started knitting and crocheting, and now, it hasn’t even been a year but she’s already made several stuffed animals and a blanket for our cat.

The mentality that a hobby has to be started when we are young is harming out perception of what we are capable of. It doesn’t matter when we start. It matters how much we care about it and how much work we put in.
earthquakes — a poem. 1 mississippi… coiled like a fetus…
Tags: Time, Growing Up, Poetry, Poet, Poem

1 mississippi…

coiled like a fetus, underneath the table

what if my bookshelf falls?

or the power outlet shocks me?

or my house catches on fire?

where do i run to?

2 mississippi…

hands over my head, protecting my skull

what will I save first?

my laptop, my memory box, or my journals?

what about that movie ticket somewhere inside my desk drawers

that i just can’t seem to throw away?

3 mississippi…

heart racing, thoughts running

how easy life could my life have been?

if my hands didn’t sweat and my arms were hairless

and earthquakes didn’t exist

i finally wouldn’t be scared anymore

4 mississippi…

paralyzed by fear, motivated by survival

it’s the more important things that drive me

my purpose, my relationships, my identity

what seemed the world one second ago

ceased to matter instantly

5 mississippi…

rumbling stops, a comforting silence breaks in

what mattered at 1 transformed at 2

and what ruminated at 3 dissipated at 4

time doesn’t stop and worries don’t just disappear

but just stay calm and count to 5

jn
What even is adulting? (part 1)
Tags: Millennials, Adulting, Lifehacks, Growing Up

I’m still trying to figure that out. When you’re a child, they try to teach you things about being wise in your older years. “They” being teachers, parents, elders and honestly whoever else thinks that their big words will apply more value to your life.

What you aren’t taught is how to deal with seasonal depression, or body dysmorphia, or how to take dick, or how badly waxing hurts, or that the incognito really doesn’t hide what you’re searching on the internet, or how vital therapy is. I guess the point I am trying to make is what the fuck is adulting anyway? Is it even a real thing? Is adulting the equivalent to the “American Dream” with the white picket fence? (Because I’ve been scammed.)

Ok. What I’m really trying to say is welcome to a series of stories, essays, and whatever else you want to call them. I don’t know how to be an adult truthfully. Sometimes, I don’t even want to get out of bed. I’m not always ready to take the day by the horns. But one thing I do know is that I’m still here. You’re here too. So, let’s adult?
the abandoned castle in the sea
Tags: Growing Up, Loneliness

It’s a deeply unsettling feeling knowing it’s inevitable to be alone.

The summer before college, a week before turning 18, I found loneliness and lost that fear.

August 2nd, 2018

“Anyway, on another topic, 2 months in China have allowed me to detox, turn off my mind, and realize all the unconditional out there for me. My favorite moments of this trip are sitting on the crowded public transit bus, second seat from the back, windows open all the way–getting a view of the city as I listen to music. I also loved the abandoned castle in the sea, and engraving it’s image into my mind as I sat on a dingey, splintering boat. Diving down to the ocean floor to look at the algae and mysterious ocean blobs. Resurfacing, seeing the sun through the hazy lens of the ocean surface. Bobbing up and down like a buoy. Just floating.

For once I felt truly at peace. I felt alone, but in the best way possible. A comforting sense of loneliness. A sense that it’s me against the universe and the only person who really “got me” is me.”

The abandoned castle in the sea reminds me of the beauty in being alone, and the ever-lasting strength of solitude. I tie this moment to my present life in college: from walking alone on campus at night, to riding the metro bus to my internship, to the cliche coming of age moment where the protagonist tunes out the world and sinks into water, I realized there is so much serendipity in feeling alone. It’s so comforting knowing at the end of the day the only sense of permanence is your own existence. When I found loneliness, I lost fear, and I’m ready for anything the universe throws at me.
Trying to make it in the world
Tags: Teen, Growing Up, My Life Story, Self, Working Hard

So we know I’m dumb 16 year old who manages all this schooling and working. Did I mention I have a boyfriend who’s home life is a wreck and I play softball and do art. I always thought I was never good enough and lazy to do anything. But writing all this. It made me rethink that. So for college work I do a math class but I would need a second one for credit. Only because I failed a huge math test my freshmen year that took me about 3 days also known as 6 hours and about 65–80 questions in total. I am not a math whiz not even close. So i’m stuck doing more math which might I add dread more then anything. In the spring time I’ll take two classes intro to psych and earth science. The intro class is suppose to be a speedy up class, so twice the work in half the time. After that class is done my season starts. If Covid allows it.

Now above I put up a picture I’m hoping to hopefully take a picture or two and post in in here rather something new to talk about or just to add something to the entry. What I mean in the picture was that my boyfriend, his parents, my parents, and I got into a bit of a how do I say this trouble. Me and him did something that wasn’t allowed and my siblings were bothering me and with the stress getting to us we (mostly him) just lost it. He was keeping his mouth shut and not saying a word but actions speak louder then words of course and everyone knew he was pissed. (I may cuss every now and then so can’t handle one or two cuss words this may not be for you but you should all handle it). Therefore that’s how we get in trouble. Another thing happen but I’ll save that story for you later. Therefore the day I planted that sunflower seed was my 5 month mark with him and I wasn’t allowed to see or talk, or text him. It was hard with the quartine and the fact he lives 45 min away from me and still go to the same school.

So know that we got some of that I also wonder if I become good enough I could make an extra buck. Now I’m not only on here to make money I mean what I said about just wanting to write to other people but there’s this trip I’m dying to go on since I was 13 and it’s happening in 2022 but costs a lot of money and I’m saving for a car and don’t even have a lot of money. So maybe I’ll be good enough for that…one day. If not in time fro the trip that’s alright I’ll keep working for it. I’ll explain the trip another time. And if I go I’ll make sure to write all about it. I’ll dedicate a whole entry based off the trip. it’ll be 12 days worth of an entry but that would be a while.

So I know I said A lot of story’s for next time so I’m gonna add my email and if anyone has any questions, comments, or requests of stories to hear let me know. I don’t know when I’ll be writing throughout the week but posting maybe on wednesdays. My email is mackenziepeace14@gmail.com hope to hear from you see have a great week or a good day
Letter to 10 year old Mel —The effects of Social Media (you probably don’t even know what that is yet)
By: Melissa Taylor
Tags: Insecurity, Social Media, Growing Up

I’m writing from 2020, I’m 22, and the world is much different through my eyes now than it was at your age. Significant changes have undergone in society, in you, in your lifestyle since 2008— changes that you will not be able to fathom until you gradually become eased into them throughout your adolescence. Within the next 12 years, your priorities will change with your freedoms and choices. You will be introduced to new ways of thinking, being, and presenting. Everything you do will become calculated, consciously or unconsciously. The culprit? “Social Media”.

Since you are 10 I can guarantee the term “Social Media” hasn’t entered your vocabulary yet. To explain, we’ll start slow:

Right now, the only “social media” you have is MSN messenger and email. You use these platforms to talk with friends instead of calling them.— you’ll stop using these when you get a cell phone in a couple years (texting is easier). You enjoy using these platforms because it allows you to stay connected to your friends and extended family, especially ones that live far away.

In three years, when you’re 13, you’ll sign up for a website called Facebook. Most of your friends signed up last year, but your parents wouldn’t let you until now due to privacy concerns. Facebook has all the great parts of MSN and email; you can message your friends and family whenever. It also has features of adding photos, a profile picture, status updates. For the rest of elementary and middle school you’ll have bimonthly assemblies and school speeches about the importance of not posting bad photos online, not talking to strangers online, not posting your personal info online.
Don’t Be Fooled — Ageing Has Got Nothing to Do With Increasing Age
By: Fareeha Arshad
Tags: Growing Up, Japanese Culture, Life Lessons, Ageing, Life

I was 23 and couldn’t stop thinking about aging— until the Japanese senior citizens saved me.

It was embarrassing even admitting that. But trust me, there was a time in my life when I couldn’t stop myself from thinking about it.

It’s not just the aging I was scared of.

It was everything else that came along with it too that haunted me — the loss of physical agility and strength, the loss of memory, the chronic diseases that would overpower my body, and the possibility of bank accounts drying.

That’s not it. It was the possibility of a slow and painful death that I was the most scared of. The questions and fears were limitless.

What if I die a lonely death?

What if there is nobody to take care of me?

How would it feel having the loose and wrinkly skin hanging from my bones?

What if I grow old alone?

How pathetic would it be not to be able to take care of me?

Will I have accomplished my goals by then?

I would be anything but graceful. How would it feel?

I was so scared of the possibilities that I stopped living and enjoying the present. The fear was so horrorsome and crippling that I couldn’t meet my grandma’s eyes for a while.

I wasn’t only scared for myself growing old, but I was also scared of the growing more aged people.

Please don’t get me wrong. I didn’t hate older adults. No. Not at all.

If anything, I felt this overpowering innate urge to help somehow boost their telomerase activity or anything at all — to protect them from going through the horrors that I was undergoing in my head. I wasn’t only scared for myself growing old, but I was also scared of the ever-increasing senior people.

Fear of getting old (FOGO) or gerascophobia, as they call it, is not a new phenomenon. It’s so rampant that as many as 87% of Americans have one or the other fear of aging. The statistic is not much different in the other parts of the world, either.

Six years of my constant mental battle was defeated by introducing one page of the 2018 Guinness Book of World Record. The Japanese always top the oldest living population but do not look a day above 70. Despite being 100+, they live a normal life, take care of themselves, and still work towards their ambitions.

The ageless Japanese older adults from the Guinness book taught me that growing old is just an inevitable part of life. It doesn’t have to be scary. You have to be willing to age gracefully — just the way they do.
Asp.net Core
By: Shailendra Gangrade
Tags: Dotnet Core

Dot net Core is very popular nowadays because it is platform-independent.
C# 9 and .NET Core 5.0 — How to install and use it in project
By: Mandar Badve
Tags: Aspnetcore, Dotnet 5, Cshar, Csharp9, Dotnet Core

C# 9.0 and .NET Core 5.0

Officially Microsoft launches C# 9 with .NET 5 Core version. You can download .NET 5.0 from here.

You can download latest version .NET 5.1 Core for Visual Studio 2019 (v16.8) / Visual Studio 2019 for Mac (v8.8). Please update Visual Studio to this version if you don’t have already.
How to persist data in Docker Volume?
By: Salman Khan
Tags: Docker Volume, Dotnet Core, Docker, Linux

Photo by Dominik Lückmann on Unsplash

What is docker?

Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code, and runtime.

What happens when we stop and run the new container?

Docker creates its own environment when we run any container. Data that we upload in our running application goes into the virtual environment. So once we build a new image and run it, the data which are stored in the previous containers will lose their reference and we can no longer see those data.

When I was learning Docker then at that time I got confused about where my data went. After doing R&D I got to know about Docker Volumes.

What are Docker Volumes?

Docker volumes are just folders that contain data that is generated by and used by containers. Default location for Docker Volumes are /var/lib/docker/volumes. To persist our data into these volumes we need to give reference to these volumes while running the docker container.

How to run docker using volume?

First, create the volume by firing the below command

docker volume create volume-name

To get the path where your volume resides type docker inspect volume volume-name. You will get the below data in your terminal where “Mountpoint” is the path which we are looking for.

[

{

"CreatedAt": "2020-12-13T14:15:39Z",

"Driver": "local",

"Labels": {},

"Mountpoint": "/var/lib/docker/volumes/hello/_data",

"Name": "hello",

"Options": {},

"Scope": "local"

}

]

I have used Docker with .net core always and to build my image I type docker build -t “image-name” — file Dockerfile .

Now our main and final step is to map the volume with our container. To map it fire the below command

docker run -it -d -p 0.0.0.0:80:80 -v /var/lib/docker/volumes/ volume-name /_data:/app/wwwroot/images/ image-name

-v in the above command is the volume command which maps our volumes folder(refer to point 2 for path) with the container folder where our data gets stored inside the containers. For e.x: /app/wwwroot/ is the default folder in .net core where all our static files goes.

Note: To check your data inside volumes navigate to the volume path and you will see your data that you upload on your application.

If you found this article helpful then please clap it. Your each clap matters a lot ❤️ to me.
Consuming HashiCorp Vault API With .NET Core HTTP Client
By: Marco Urrea
Tags: Http Client, Http Request, Hashicorp Vault, Dotnet Core, Secrets

Its been a while since the last time I did some code in .NET, so to keep the habit, today I bring a tutorial on how to consume HashiCorp Vault with Microsoft .NET Core.

As most of us know HashiCorp Vault is API-driven, which means it can be consumed virtually from anywhere; so I wanted to test it out with .NET Core.
Open source is the new normal
By: Vaishnavi Vadali
Tags: Mlnet, Dotnet Core, Blazor, Open Source Software

With the advent and growth of so many programming languages and the availability of open-source code, the future of languages like C# is a nagging question . “Our industry does not respect tradition — it only respects innovation.” — Satya Nadella wrote this in an email to his employees on his first day as CEO of Microsoft.What is it that giants like Microsoft do to stay in the race and win it in style?

As Microsoft develops and evolves, so does its development platform, the .NET framework. Until late 2014, the .NET framework, the development framework of Microsoft was a licensed version and available only on the Windows platform. On 12th November 2014, Microsoft announced that .NET Core is going to be its open source offering of the .NET platform. The first version was released on 27th June 2016 and the latest .NET 5, was released on 10th November 2020.

Source: https://devblogs.microsoft.com/cesardelatorre/what-is-net-core-5-and-asp-net-5-within-net-2015-preview/

Since its release, .NET Core has become one of the hottest frameworks in the market. It includes AOT, GC, Runtime, JIT, Base Class Library, ASP.NET, C#, ML.NET, VB.NET, F#, Entity Framework, WinForms, WPF, and Xamarin. .NET Core 3.1 is small and fast making it ideal for cloud. .NET 5 is one of the best frameworks to migrate to Blazor, or Angular, React, and Vue SPA frameworks. Other technology stacks that adopted to .NET 5 bandwagon include Winforms, WPF, and UWP. All these technologies support desktop applications that work only on Windows..NET 5 has EF Core, ASP.NET Core, ASP.NET Core MVC, MSIX and JsonDocument in the offering.
Astonishing Performance of .NET 5
By: Alex Yakunin
Tags: Dotnet, Dotnet Core, Dotnet 5, Performance

The output is produced by Fusion’s “Caching” sample, which uses EF Core 5 and ASP.NET Core. The speed on tests producing 20M+ operations/s (#1, #3) is mainly constrained by Fusion’s logic and Castle.DynamicProxy. And tests producing around 100K operations/s are constrained by either EF & SQL Server (#2, #5) or ASP.NET Core (#4 — it’s ~ the same as #5, but relying on Fusion’s caching features). All of this means that:

You may expect +20% speed boost in “normal” apps

And it can go up to +100%, if we’re talking about relatively fast ASP.NET Core API endpoints (the ones heavily relying on caches, etc.).

If you’d like to learn more about performance improvements in .NET 5, check out this post by Stephen Toub.

I plan to run a few more tests today and share more details —most likely, GCBurn (garbage collection & allocation performance test) and the code I used earlier to compare SIMD-accelerated logic on C# & C++. But it is clear even now that .NET team delivered more than I could expect — congrats and huge thanks to everyone who made this possible!

Update: Astonishing Performance of .NET 5: More Data
Migration From Asp.Net Core 3.1 to 5.0— Real Project
By: Alexandre Malavasi
Tags: Dotnet, Dotnet Core, Aspnetcore, Aspnet

The purpose of this article is to share my personal experience of migrating a medium complexity real project from Asp.Net Core 3.1 and Asp.Net Core 5.0.

The project uses the following stack:

Asp.Net Core Web API

Vue JS front-end without any Razor Pages used in the project. The entire front-end is a Vue JS application

Entity Framework Core (Code First approach)

SQL Server Database

At the beginning of my career, almost all the time I decided to postpone the upgrade of .NET projects under my responsibility to the newest version of the underlying technology. There are many factors that should be considered before migrating a system: costs, effort, complexity, business value, etc. Therefore, depends on the scenario, many projects aren’t migrated to a newer version.

I changed my mind in the last years, mainly after the launch of the first version of .NET Core. The first migrations from .NET Framework to .NET Core might be problematic for complex projects, but the migrations between .NET Core versions and to .NET 5 should not be that hard.

In the rest of the article, I’m going to demonstrate all the steps I made to migrate a real project, all the problems, and, of course, the solutions I’ve found and applied.

Visual Studio Update

The very first thing I did is to update Visual Studio 2019 to the latest version once the .NET 5.0 was officially launched yesterday (November, 11th).

Usually, the update installs the newest .NET SDK as well. But, in case it is not, you need to install the .NET 5.0 SDK:

https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-5.0.100-windows-x64-installer

Framework version change

Change the Target Framework to .NET 5.0:

In order to make in how many issues you could have after this step is recommended rebuild the application and see how many issues will appear in compile time. In my case, no problems so far:

Project file (.csproj)

The next step is to update the version of any package that has the target to .NET Core 3.1 version:

Nuget package updates

Logically, the next step was to upgrade the rest of the packages used by the application to the newest possible version. In that context, I was using just third party libraries for Vue JS Middleware and native libraries of .NET Core. But, it might be different in your scenario. So, it is really important to analyze it before your own migration.
Template — Vue JS 3.0 + Asp.Net Core 5.0 — Visual Studio 2019
By: Alexandre Malavasi
Tags: Aspnetcore, Aspnet, Vuejs 3, Dotnet, Dotnet Core

I’m a big fan of Vue JS and .NET platform on the same page. I got pretty satisfying results using both in projects of any size and complexity.

By default, the Visual Studio does not have any native template specifically for Vue JS + Asp.Net Core, like it has for Angular + Asp.Net Core. Setup from scratch a Vue JS application including routes, initial components, API call configuration, CSS libraries (and others) may take a little time. Additionally, the integration with Asp.Net Core in the same project requires the use of a custom Middleware and extra configurations on Startup.cs.

Because of that, I created to help the technical community my own template of Vue JS 3.0 and Asp.Net Core 5.0 Web API application. You can download the extension for Visual Studio 2019 over here:

Installation

To use it just download the extension at the given link and follow the step by step after executing the file:

Usage

After the installation, a new project type will be available on Visual Studio. Choose the option to create a new project and search template by name:
Building Clean Architecture Application using ASP.NET Core Web API and Angular 11 — Backend
By: Sunil Kumar
Tags: Cqrs, Fluent Validation, Swagger, Dotnet Core, Nhibernate

In this article, we are going to learn building a Clean Architecture application using ASP.NET Core Web API and Angular 11 Front End.

Series Links

Building an ASP.NET Core WebAPI using Clean Architecture

Building an Angular 11 Application integrated with WebAPI

Overview

Building an ASP.NET Core WebAPI using Clean Architecture

Features:

ASP.NET Core 3.1 Web API.

API Versioning

Swagger UI.

JWT Token Authentication

Global Error Handler Middleware

CQRS ( Command Query Responsibility Segregation)

MediatR

NHibernate ORM

Generic Repository Pattern

Fluent Validation

SQLSERVER

Github Project

You can refer to the below GitHub project for complete implementation.

Onion Architecture

Clean Architecture

The architecture defines where the application performs its core functionality and how that functionality interacts with things like the database and the user interface. Clean architecture refers to organizing the project so that it’s easy to understand and easy to change as the project grows. Command Query Responsibility Segregation is a design pattern to separate the read and write processes of your application. Read operations are called Queries and write operations are called Commands.

Project Structure

Swagger UI Setup

The swagger object model and middleware exposes the JSON objects as Endpoints

Installing Swagger packages using NuGet package console with the below command.

Install-Package Swashbuckle.AspNetCore -Version 5.6.3

Swagger Configuration with Bearer token Authentication

JWT Token Implementation

The JWT Bearer Token is used for accessing the WebApi endpoints securely. Below is the JWT configuration

Token Generation On Successful Login

Global Error Middleware

Server Internal Error Exceptions and Business Validation Exceptions are handled and the response is returned for use of displaying these validations in UI.

NHibernate ORM and Generic Repository Pattern

NHibernate is used to interact with the database. Singleton Session factory is implemented. Below is the Persistence Layer Service Extension.

User Entity

UserMap

Fluent Validation

Package Reference:

<PackageReference Include=”FluentValidation.DependencyInjectionExtensions” Version=”9.3.0" />

To define a set of validation rules for a particular object, you will need to create a class that inherits from AbstractValidator<T>, where T is the type of class that you wish to validate.

Below is the sample Create User Validations.

Summary

Hope enjoyed my first article please feel free to download the code and play around. Next article we will get in touch with Angular 11.
Asp.Net Core MVC Complete, free and step by step video tutorial
By: Nitish Kaushik
Tags: YouTube, Aspnetcore, Dotnet Core, Programming, Tutorial

Photo by John Schnobrich on Unsplash

Welcome to the Asp.Net Core MVC tutorial. This is a complete and step by step tutorial for all the developers.

WebGentle Free YouTube video:

You can learn Asp.Net Core MVC tutorial from WebGentle YouTube channel free of cost.

You can access WebGentle youtube channel by clicking here

Kindly subscribe to WebGentle Youtube channel:

Subscribe to us by clicking here.

Who can learn from this tutorial:

All professionals who want to start their career in asp.net core framework and want to add new skills to their bucket can learn asp.net core from this tutorial.

Fresher

Experienced

Anyone who has a basic knowledge of programming

Key features of this course:

Free of cost — No need to pay anything

Complete and step by step solution

English language — Tutorial is available in the English language

Excellent combination of Theory, practical example & Live application.

Prerequisite:

No special knowledge is required for this tutorial. But it will be helpful if have basic knowledge of

C# (Class, Method, Property, etc.)

OOPS Concepts

HTML & CSS

List of all the videos:

Contact the author:

You can contact Nitish on nitish@webgentle.com, nitish.webgentle@gmail.com

Nitish’s official blogs:

https://nitishkaushik.com
Blazor WebAssembly Application that sends email using SendGrid
Tags: Aspnetcore, Blazor Webassembly, Dotnet Core, Blazor, C Sharp Programming

Blazor WebAssembly project

For every Blazor WebAssembly project, the entry point for the application is the App.razor component. If the path of the application being requested exists, the page is then rendered in the @Body property in the MainLayout.razor component.

The MainLayout.razor component is where we can specify the components that will be shared across multiple pages, such as a website header and footer. In our case, we create a header component called MainHeader.razor that is referenced in the MainLayout.razor as shown below:

MainLayout.razor

Create components to better organize a page

In order to better organize this application, I have created multiple components and then referenced them in the page instead of having a very large component. An example of this can be seen here below in the Index.razor page, where it references 3 components:

Index.razor

Blazor Animations

To create animations in the application I used the Blazor.Animate nuget package created by mikoskinen. In order to add this nuget package simply run this dotnet cli command inside the Blazor WebAssembly folder:

dotnet add package BlazorAnimate --version 3.0.0

To add animation to a Component or a HTML element, simply wrap it inside the Animate component as shown below:

Example on how to use the Blazor.Animate nuget package

Call Backend Web API

Blazor supports dependency injection. Dependency injection will be used in order to have a single instance of the the service across all components and also to decouple the components from the concrete service class.

In our Blazor WebAssembly application we have created the EmailService.cs class that will be injected in the DI container in Program.cs by doing:

The service class above requires the HttpClient class in order to call the backend Web API, so we will add it with a Dependency Injection lifetime of Scoped (a new instance is generated for every request). In this configuration we will also set the ASP.NET Core backend Base Address. It is important to say that in a deployed application the base address should be configured in a configuration file such as appsettings.json or have the value coming from the Azure Key Vault service when this application is running in an Azure App Service for example. When running locally, the base address for the Web API is https://localhost:44345 :
The Coder’s Guide to C# Development.
By: Don Pablo Brincat
Tags: Mvc, C Sharp Programming, Programing, Dotnet Core, Developer

The Coder’s Guide to C# Development.

In this series, we’re going to cover everything you need to know about ASP.NET Core and MVC.

ASP.NET Framework

ASP.NET Competitors

Why I Prefer a JavaScript Framework to ASP.NET MVC — It just doesn’t cut. See why this developer prefers working with “mature JavaScript frameworks” over MVC.

Top 10 Websites Written Using ASP.NET MVC — Take a look at ten popular ASP.NET MVC pages. Some of the entries might come as a surprise to you.

A Direct Comparison of WCF and ASP.NET Core Functionalities — Are you looking to implement ASP.NET Core for your next project? Check out this video to learn more about its features and how it compares with WCF.

Getting Started with ASP.NET
Simple DotNet Core API with AWS ECS Fargate using Terraform
By: Jazz Tong
Tags: Ecs Cluster, AWS, Terraform, Aws Fargate, Dotnet Core

Setup Terraform script

We are done on the application side. Now, we need to build our infrastructure. Create folder infra on the project root, and setup the following.

Data resource

Terraform resource allow us to read existing infrastructure attribute such as VPC and subnet. In our case, we reuse existing default VPC.

Create file data.tf in infra folder with the following content:-

Application Load Balancer

Create file alb.tf in infra folder with the following content:-

We setup ALB with default static content and a routing rule for path /WeatherForecast* to our ECS resource.

ECS Cluster

Create file cluster.tf in infra folder with the following content:-

Security Group

We will create one Security Group to share for ALB and Service, create sg.tf in infra folder with following content:-

The Security Group we create will allow internal traffic and public traffic for port 80

ECS Service

We create one ECS Service my-api to run in our ECS cluster. Create file service.tf in infra folder with following content:-

The ECS Service will use basic setup for 1 runing task and route traffic from ALB

Task Definition

Task definition is used to describe what container configuration and image we need to run. Create file task-def.tf in infra folder with the following content:-

We use the image that we pushed earlier for this task definition

Task Role and Task Execution Role

ECS has two permission models to manage the resources. One is Task Role to assume role access for container and another is Task Execution Role for ECS cluster to run on behalf of us, such as pulling image. To make this simpler, we will use one role for both permissions. Create file task_role.tf in infra folder with following content:-

The role only provides basic ECSTaskExecution role policy and CreateLogGroup permission. You can add more if you need other permission.

Output file
About database delivery approaches
By: Aleksander Parkhomenko
Tags: Migration, Database, Sql Server, Dotnet Core, Cli

Photo by Markus Spiske on Unsplash

Previously I mentioned about creating database during MS Sql Server Docker container starting:

now, I going to tell about a database and a methods we’ve used to delivery database updates to our apps.

In contrast to pure Sql scripting while developers “upsert schema” (create or update), change data, also popular are “migration style” projects like Liquibase in Java world or Entity Framework Migrations in .NET world. It is convenient to define subsequent database changes in XML, YAML or in code and store it in repository, while the framework will keep an eye on execution of appropriate database changes. Also it is handy during CI/CD process configuration.

Our choice was Fluent Migrator project, responsible for database “schema and data upsertion”.
EF Core 5.0 Yenilikleri - 7
By: Oktay Kır
Tags: Programlama, Yazilim Gelistirme, Entity Framework Core, Csharp, Dotnet Core

OKTAYKIR/blog.EFCore5Preview

EF Core 5 Samples. Contribute to OKTAYKIR/blog.EFCore5Preview development by creating an account on GitHub.
First Blog Post
By: Avinash Karat
Tags: Programming Tips, C Sharp Programming, Dotnet, Dotnet Core, Programming

hi guyz, at last I am “also” starting a blog of my own. I am not sure whether I could stick with it, as I am a chronic procrastinator and have very little focus over things. Anyways I have been thinking of starting a blog for many years, and each time I began to start, my laziness and imposter syndrome will take me down. Today I summoned courage from somewhere and writing this first post.

Basically I am a .Net developer and have worked with C# as my primary language for more than 9 years. I am just a mediocre developer who wants to become better. I will try to write my thoughts and viewpoints here. Hope you enjoy it!
.NET 5 Hello World
By: Ndamulelo Nemakhavhani
Tags: Dotnet, Dotnet Core, Dotnet 5, Csharp

Net 5 is finally here! Official announcement.

Let’s test it out by writing the famous Hello word console app.

Getting started

Download Visual studio 16.8

Create a new .Net core application

Open your project settings file and change the target framework to .Net 5 as illustrated below:

.Net 5 Console app example

Add this code to Program.cs

C#9 Hello world app
Deploy .NET 5 application on App Service
By: Rebai Hamida
Tags: App Service, Microsoft, Dotnet 5, Microsoft Azure, Dotnet Core

Introduction

Last year, in Build 2019, Microsoft announced .NET 5, the next release in the .NET family, and it is released today and it can be used in a stable version.

.NET 5 includes C# 9 and F# 5 with a set set of new features and improvements.

App Service now supports .NET 5 applications across all public regions and scenarios on both Windows and Linux App Service plans.

Schedule

Prerequisites

You can download .NET 5.0, for Windows, macOS, and Linux, for x86, x64, Arm32, Arm64.

If you want to use Visual Studio 2019, you need to update the version to 16.8 or later to use .NET 5.0 on Windows and the latest version of Visual Studio for Mac) on macOS and you don’t need to install it from previous link, it will be included by default in .NET project templates.

Create .NET 5 Application in Visual Studio 2019

We need to open Visual Studio 2019:

.NET 5 on App Service

You need a have an account in Azure to deploy any application in Azure:

While they are starting with .NET 5 early access they plan to use the Early Access mechanism to deliver faster and more frequent updates for all the App Service supported languages including Node and Python and others.

This is the video:

Deploy .NET 5 Application to Azure App Service using Visual Studio 2019

You can see more details in .NET Conf: https://www.dotnetconf.net/agenda
C# How to mock an unmockable class
By: Riccardo Santoro
Tags: Software Development, Software Engineering, Csharp, Dotnet, Dotnet Core

C# How to mock an unmockable class

Photo by Kevin Ku on Unsplash

Along the road this year, during one of my “pay back your code debt” weeks, I stumbled into this class that had 0 coverage.

Original code

This class has an implicit dependency on SmtpClient that I need to extract in order to make it unit testable.

Fortunately SmtpClient isn’t sealed so we can do some magic™.

Let’s start by extracting a new class that will generate the instance.

First refactor

Ok, now we have this new class SmtpClientGenerator that given a configuration will create a new instance of SmtpClient via the public method GenerateClient .

This isn’t enought though, to mock SendMailAsync I need an interface and SmtpClient doesn’t implement one.

Let’s wrap SmtpClient to another object and create a new interface.

SmtpClientWrapper now implements SmtpClient and ISmtpClient .

ISmtpClient now declares SendMailAsync which has the same SmtpClient signature.

GenerateClient now returns ISmptClient .

Let’s update the service class with the new code.

We have all the building blocks now, let’s test our code.

Test code

Perfect, now we can mock both ISmtpClientGenerator and ISmtpClient .

Remarks

System.Net.Mail.SmtpClient isn’t recommended by Microsoft, use MailKit instead.

MailKit already has a IStmpClient interface so we won’t need SmtpClientWrapper at all.

I use Xunit and Moq as my testing tools.
Identity in .NET Core?
By: Michael Disaro'
Tags: Identity Management, Gdpr, Open Source, Iam, Dotnet Core

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Let’s build web app. with ASP.NET Core MVC
Tags: Dotnet Core

Software engineering and film. All are work-in-progress.
.Net 5: System.Net.Http.Json Keşif Serisi #2
By: Erkan Güzelküçük
Tags: Dotnet Core, Dotnet 5, Net5

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Meu ambiente de desenvolvimento no Windows
By: Thiago D.
Tags: Backend, Rabbitmq, Apache Kafka, Dotnet Core, Frontend

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
.Net Core User Secrets Explained
By: Bugra Sitemkar
Tags: Dotnet, Software Development, Visual Studio, Dotnet Core, C Sharp Programming

Photo by Stefan Steinbauer on Unsplash

If you are consuming external services in your projects, at some point you need to add some usernames, passwords, API tokens and secrets to your project's settings file for the services you are consuming. Unlike other environment variables, this sensitive information should not be sent to your repository even it is a private repository. There are some ways to keep this information secret like manually deleting these values from app settings file before sending it to your repository or adding settings file to .gitignore file, etc.

One of the most convenient ways introduced is User Secrets. User secrets settings file is basically another settings file which is not kept under the solution directory.

One way to add user secret is to add it from dotnet CLI. The following commands can be used to manage user secrets.

1 — The list command shows you a complete list of keys and values in the secrets.json file.

dotnet user-secrets list

2 — This command sets the AppSettings:ConnectionString key to the specified value.

dotnet user-secrets set "AppSettings:ConnectionString" "some-value"

3 — As you already guessed, this command removes the AppSettings:ConnectionString key and value.