So we have a mission to get lyrics for a music. Here are some APIs we can use to fetch song lyrics:
Lyrics.ovh API — Public APIs. A simple and free API that allows you to retrieve lyrics by providing the artist's name and song title. It's easy to integrate and provides JSON responses.
Lyrics & Music API | API.This API offers advanced features, including searching by l...
[More]
When building software in C# and .NET we need to create secure codes to make sure that the software is running well. Here are some keys steps to implement secure code:
Input validation. Always validate user input to prevent attacks like SQL injection and cross-site scripting (XSS).
using System.Text.RegularExpressions;
string userInput = GetUserInput();
if (!Re...
[More]
Step-by-Step Guide
Set Up Your Environment:
Ensure you have Visual Studio installed.
Install the necessary NuGet packages: Moq and xUnit.
Create Your Database Mock:
Use Moq to create a mock database context.
Write Your Unit Test: Define
your test cases using the xUnit framework.
Use the mock objects to simulate database interactions.
Example
Let's say you have a funct...
[More]
Cloud era do We need OO?
This is q good question. We have a lot scripting framework that can be used to develop sophisticated web. We have low level codes that can help build an app within a minute. We have cloud template to deploy solution in minutes. Do we still need Object Oriented (OO)? The answer is it depends.
When you build a game, you might need OO. In example, unity project needs C# s...
[More]
Video game development in Visual Studio
Microsoft loves video games. Xbox, Game Pass, and DirectX is a real proof that Microsoft is committed to video game. As a result, we see a lot opportunity to build video game in any platform with Microsoft Based technology. You can see a specific section namely gaming. Microsoft has two categories: Game Development with Unity (C#) and Game Development with ...
[More]
Background
There are numerous ways to consume REST API in C#. Starting with HttpClient, WebClient, HTTPWebRequest and Third-Party API. On this post, I will show you how to consume REST API in an easy way with C#.
Requirements
For this lab we use:
Visual Studio 2019 – http://visualstudio.com
Newton soft JSON - https://www.newtonsoft.com/json/
Rest sharp - http://restsharp.org/
Horosc...
[More]