I will write down the useful method. I used it several times and it works good. It's C# method to create a UNC directory recursively and return the path.
(read more...)I will write down the useful method. I used it several times and it works good. It's C# method to create a UNC directory recursively and return the path.
(read more...)If you want to write an application which uses RabbitMQ, I advise you to use docker image of Rabbit. It's lightweight and can be easily executed.
(read more...)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 require this framework.
(read more...)Once I tried to make the application to migrate a custom data source from SharePoint 2010 to SharePoint 2019 on-premise. To make it easier, I decided to make to separate solutions – the first one to export the data from SharePoint 2010 from the list to JSON and attachments to local folder(CSOM for SharePoint 2010 sucks) and the utility to import data to SharePoint 2019 via REST.
(read more...)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...)In my application I had rendered JSON data with AngularJS and I had to send it to a controller in my MVC application to render PDF file and to allow a user to save it. So, the task was dynamically to submit the request, render a file and allow user to save it.
(read more...)StreamWriter has some options of usage. You can as add new text to an existing text in file, so and to clean existing text and add a new one.
C# snippet below helps to read SQL data to List<T> generic collection without any extensions or frameworks only with SQL and LINQ.
Junior developer created some tools which packed to zip-archive some rendered files. He used for this DotNetZip (Ionic.Zip) library. Everything worked fine until today. But today, when users users tried to open zip-file, they've got the error "CRC has failed, the file is corrupt".
(read more...)
Reading and querying XML data is good with Link to XML in C#. LINQ to XML provides an in-memory XML programming interface that leverages the .NET Language-Integrated Query (LINQ) Framework.