Asp Net Core 2 – Angular: download file from Controller

If we have an Angular client app that needs to download a file (for example a PDF file) from an Asp Net Core 2 api Controller , we can follow what is described in this post. The first implementation is on the server side (an Asp Net Core 2 Controller). So, for example into our controller UserController, […]

En Lire Plus

C#: how to validate XML with a set of XSD schemas

When we are using an XSD schema to validate an XML document, if this schema has other nested XSD schemas, if we have a myCustomType declared into the nested XSD and we don’t use XmlSchemaSet to validating the XML, we can get the error: Type ‘myCustomType‘ is not declared For example, if we have the myCustomType defined […]

En Lire Plus

Entity Framework Core: set connection string on ASP Net Core

If we had a connection string stored into the appsettings.json file and we want to set our DbContext class to use this connection string, we need to call our DBContext constructor with che connection string parameter into the ConfigureService method of the class StartUp.cs. For example, into the appsettings.json file we declare the connection string like the […]

En Lire Plus