Release Infra.Standard 2.1.0.17

–NEW– 
 

Methods

 
New IO.GetDrivesInfo – Get a list of Drives Info
New IO.GetDrivesNames – Get a list of drives names
New IO.GetPathDirectories – Get a list of directories on path
New IO.GetPathFiles – Get a list of files on path
New IO.GetPathAllFiles – Get list of files in path and subfolder
 

Nuget Package: maqdel.Infra.Standard

Project page: maqdel.Infra

Release Infra.Standard 2.1.0.16

–NEW– 
 

Methods

Extensions.CharacterCount – Get character count.
Extensions.ToCapitalize – Capitalize string.
Extensions.ToUniversalDateTime – To universal datetime.
Extensions.ToUniversalDate – To universal date.
Extensions.ToUniversalTime – To universal time.
Extensions.WordCount – Get word count.
 

Nuget Package: maqdel.Infra.Standard

Project page: maqdel.Infra

#Git – How restore a file from another branch

-Having a main branch called “main” and a working branch called “myproject” we want to restore on branch “myproject” the file “filename.ext” with the version on branch “main

-We switch to the “myproject” branch

git checkout myproject

-We use the restore command

git restore –source mainfilename.ext

-Now we must stage and commit the change of the file “filename.ext” on branch “myproject

Tested on: Git 2.36

#Git – How to do a rebase interactive

-Having a main branch called “main” and a working branch called “myproject” where all changes are committed

-We switch to the “main” branch

git checkout main

-We bring all the changes from the “main” branch

git fetch
git pull

-We return to the branch “myproject

git checkout –

-We start the interactive rebase from “main” branch to “myproject” branch

git rebase -i main

—-Here we resolve conflicts (if they exist), squash committees, etc…

-We push the rebase changes to the “myproject” branch

git push –force-with-lease

Tested on: Git 2.36

#VSCode – Basic migrations operations (CLI) .NET 6.0

Having a project with everything necessary to generate a Code-First database

-Open a Terminal

A) To check if the EF CLI tools are installed, type

dotnet ef

-This will show what versions of the CLI tools are installed.

B) To install the CLI tools, type

dotnet tool install –global dotnet-ef

-This will install the CLI tools, in case you need to update use “update” instead “install”

C) To see the list of available migrations, type

dotnet ef migrations list

-This will show all existing migrations

D) To add a migration, type

dotnet ef migrations add MigrationName

-This will add a new migration with the name MigrationName

E) To create/update a database with available migrations, type

dotnet ef database update

-This creates or updates the current database

F) To remove a specific migration, type

dotnet ef migrations remove MigrationName

-This will remove the migration with the name MigrationName

G) To remove a database, type

dotnet ef database drop

-This will completely delete the database

Tested on: VS Code 1.68/.NET 6.0/EntityFrameworkCore 6.06