Blazor - Overview

C# ASP.NET offers a way to build highly interactive web UIs using C# and .NET. Blazor helps us to make the app interactive via different modes such as Static Web Apps Interactive Server ( Blazor Server ) WASM (Web Assembly) A Blazor app is based on Components with .razor extention. It is a combination of C# and HTML. Example: // Counter.razor @page "/counter" @rendermode InterativeServer <PageTitle>Counter</PageTitle> <h1>Counter</h1> <p role="status">Current count: @currentCount</p> <button class="btn btn-primary" @onclick="IncrementCount">Click me</button> @code { private int currentCount = 0; private void IncrementCount() { currentCount++; } } // PageTitle....

Razor Pages - Overview

Razor pages provides a way to build web applications using a page-focused approach. Under the hood, it uses the same routing and middleware as MVC, and it provides directory-based conventions for views. Pages can have a viewmodel where we can define page data and actions. Pages: Pages are the main part of a Razor Pages application. Pages are created in the Pages directory and are named with the .cshtml extension. Each page can have a corresponding ....

Dotnet MVC - Overview

C# asp.net MVC is a web application framework that provides a model-view-controller architecture. The MVC pattern separates the application into three main components: the model, the view, and the controller. This separation of concerns makes it easier to manage and maintain the application. This structure also makes it easier to test and debug the application. Model: The model represents the data and core business logic related to data of the application....

C# - Testing

C#, NUnit has a lot of features that makes it a good choice for testing. It provides features for writing and running tests, and also for creating test fixtures and test suites. NUnit is a popular choice for unit testing in C# due to its simplicity and extensibility. Writing Tests NUnit provides a set of attributes that can be used to write tests. The Test attribute is used to mark a method as a test method....

C# - Overview

C# (pronounced “C Sharp”) is a modern, object-oriented, and type-safe programming language developed by Microsoft. It is widely used for developing desktop applications, web services, and mobile apps. C# supports multiple programming paradigms, including imperative, declarative, functional, generic, object-oriented, and component-oriented programming. Few things I like about C# are It’s a simple and easy to learn language. The extensive standard library and ecosystem, including ASP.NET and .NET Core. Few things I dislike about C# are...