.Net & C#

Translate to German Error messages from Microsoft. AspNetCore. Identity. EntityFrameworkCore

In one Web Api Net Core solition I used Microsoft.AspNetCore.Identity.EntityFrameworkCore for Authentication. It’s really comfortable to work with this package because you a free from the implementation of all the methods and don’t spare much time. It also returns the text of errors, for example, that password is to short or special character is required. […] Read more»

.Net & C#

How to add test data for the development and tests in EF Core

There’s a nice online tool for rendering the test data. It’s at the website https://www.mockaroo.com/. I often use it to render fake SQL data. But now I am working on a Net application with EF Core. And obviously, I need test data for webservices and interfaces. Below is the way to quickly insert the test […] Read more»

.Net & C#

How to implement Role-based Authorization in Net Core Web API

It’s an extremely nice article about how to implement the Role-based Authorization in Net Core Web API. I won’t copy it here because it’s written to good. Maybe I will publish to Git a template app later, but now just save for future. Read more»

.Net & C#

Get Groups for AD User with PowerShell or C#

In apps with different Roles and permissions you may need to get information about AD Groups. Here are some snippets which can help you with this part of the task. Read more»

.Net & C#

Simple implementation of ‘env.IsDevelopment’ for a console Net Core application

If you work with Net Core WebApi project, it already contains the packages for DI, Environment variables. But if you make a console application from the template, it doesn’t contain the packages for environment variables. And if you want to use different configs for Debug and Release, there are 2 ways: Read more»

.Net & C#

Dapper with PostgreSQL and MSSQL Server

Create a console app with .Net Framework 4.7.2 with Dapper and datasource in MSSQL Server or PostgreSQL. If you create this ancient app, you should only add Dapper and NPGSQL packages from Nuget. The support of MS SQL Server is already built in. The scenario for .Net Framework is from real life, several applications still […] Read more»

.Net & C#

C# Convert Char to Int

Once again I decided to make a new task from LeetCode and finally my process had been stopped. I could not convert Char to Int. I even spent some time for research, but I could not find any solution. Then I open the documentation and started to read. Read more»

.Net & C#

Allow CORS in Net Core application

It’s not for production, but for developer environments Add the block below to Program.cs. I talk about Net Core 5 or Net Core 6 application. Read more»

.Net & C#

Popular Posts