It’s not easy to create integration test with database, no matter whether you create queries directly against entity framework’s DbContext or you create your queries with repositary pattern which operate on your DbSets.
You need to always connect to your database to test your use cases with the real data or fake data you have prepared.
The good news is you can use the EF core’s in-memory database provider to tackle it easily.
When you develop a web application in Angular for the front-end and C# or Java in the back-end, it’s frequently that you need to upload and download files.
Here is an example that may inspire you in your development.
<!-- Upload file -->
<input hidden #feeFile type="file" #uploader (change)="uploadFees($event)" accept=".xlsx, .xls" />
<button mat-button color="primary" (click)="uploader.click()">
<mat-icon matTooltip="Upload fees" class="import-export-button">cloud_upload</mat-icon>
<!-- Download file -->
<button mat-button color="primary" (click)="downloadFees()">
<mat-icon matTooltip="Download fees" class="import-export-button">cloud_download</mat-icon>
Full-text index is different from clustered and non-clustered index in SQL Server.
Clustered and non-clustered index use a B-tree structure.
One table can have only one clustered index. And table data is physically ordered and stored into pages based on the clustered index. Page is the fundamental unit of data storage in SQL Server.
The table data is organized with root node (type: INDEX_PAGE), intermediate nodes (type: INDEX_PAGE) and leaf nodes (type: DATA_PAGE).
Clustered index structure:
You’ll inevitablly write unit tests or integration tests for internal methods and protected methods in your .net project.
Here are some techniques you can use.
I’ve looked for some complete solution to download an EXCEL file from an ASP.NET Web API in Angular 9 application, but I didn’t find it.
As I’ve done it recently, I would like to share my implementation with you if it helps.
I need to generate Excel files in my recent work. The file is not huge and it’s around 5000 lines.
I have tried two open source libraries to generate them.
Github-pages is very practical to host static websites, not only Jekyll based websites, but also Angular, React based static websites etc.
You don’t need to purchase a space for the websites hosting. It’s totally free! All you need is just a GitHub account. :)
In software development, there are at least several environments to manage: development (DEV), staging (STAG or PRE), and production (PRD).
There will be integration (INT), user acceptance testing (UAT) in a more complete environment configuration.
It could be frustrating when managing all those environments because a small error in the deployment could generate an incident, or disaster!
Fortunately there is a cool tool to facilitate the environment management and software deployment in visual studio.
Unlike ASP.NET CORE Web API, ASP.NET MVC Web API’s will not serialize the output in camelCase.
When you implement an ASP.NET CORE Web API, you may want the API to support all clients from anywhere and enable credentials at the same time.
You need to make the CORS (Cross Origin Resource Sharing) configuration in your Web API.