c#

Problems with Datetime transform with SmartFormat for Net (C#)

SmartFormat is a is a lightweight text templating library to replace string.Format. Unlike common String.Format, with SmartFormat you can read templates from text files or another source. Here I will share the way, how I tried to write the DateTime in the format ‘dd/MM/yyyy HH:mm:ss’. It was not so obvious. Read more»

.Net & C#

Fix the error in loading PFX certificate in Azure service app

For a prototype I loaded a pfx certificate from file system of Azure App. It can be done only while test!!And I got the error “Exception Info: System.Security.Cryptography.CryptographicException: The system cannot find the file specified.“ Read more»

Azure

5 steps of how to add and use AutoMapper in .Net Core project

AutoMapper is a simple little library which allows you to make less code for transforming objects of one class to another. It’s a must-have library for any complex project. There is a short scenario in 5 steps how to add and use AutoMapper in a new Net Core project with REST API. Read more»

.Net & C#

How I made a step on a rake with SharePoint SPUserId

SharePoint 2016 Logo

There are a lot of cases when you need to get the items by the author. For me the only correct way to get the SharePoint list items by user with CAML is like this: Read more»

SharePoint

Fix Download publish profile in Azure is disabled

When you want to download a publish profile for the service in Azure, there can be an error, that basic authentication is disabled. Read more»

Azure

Flexible and simple Export to Excel for .Net

Once again I have to make Export of to Excel. And this time there are requirements to the template – colors, formatting and others. Not so long ago I implemented the export to Excel with XLSX package for React, and it was rendered at client. This solution is good but has many constraints. So, I […] Read more»

.Net & C#

Swagger error ‘Failed to load API definition’

When you execute your Web Api and at Swagger Page you can see Swagger error ‘Failed to load API definition’, you can’t really determine, where the error is. It is in one of the controllers. But do you want to check all of them? Read more»

.Net & C#

Feed uniqueidentifier field with Random GUID value in SQL

There’s a data type ‘uniqueidentifier’ in SQL. If you need to feed this field with random value, you can use NEWID(). The ‘uniqueidentifier’ value in SQL looks like this: ‘234779E5-996F-45AC-90C3-21631AF4A08D’. Read more»

SQL and databases

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#

Popular Posts