.NET

Building Razor Page Web app. in .NetCore

ASP.NETCore Razor pages and ASP.NETCore MVC are both server rendered / server based frameworks for building web apps with .NET. In both techniques/approaches, we use Razor template engine to create UI/view components and processing logic that runs on the server and serves the html content back. Original razor page technique is/was developed to fit single…

All Articles

What is the purpose of static modifier?

Static modifier is commonly used in all programming languages. There are two distinct reasons for using the static modifier whether its C, Java, C#, PHP or Ruby – To access the class members without instantiating the object. eg: public class CutGrass{ public static void CleanMower(){ } } var endTheJob = CutGrass.CleanMower(); 2. To restrict the representation…

All Articles

MVC Architecture

MVC architecture has been in place since past 4 decades or so when GUI (Graphical Use Interfaces) started to be used widely. The idea is simple – to implement separation of concerns.  Plainly put, to separate 1) presentation (UI) 2) user interactions and 3) underlying data and logic/behavior. It might be easy to build a web…

All Articles

Simple Workflow Engine Implementation in C#

Below is a simple implementation of work flow engine using interfaces and the concept of injecting overloaded class implementations via the dependent class method. The class constructor creates the List for storing the specific workflow implementations which are further executed.Interface – IWorkFlowActivities namespace WFEngine {     public interface IWorkFlowActivities     {         void Execute();     } } CarWorkflow using System; namespace WFEngine {     public class CarWorkflow : IWorkFlowActivities     {         public void Execute()…

Code First
All Articles

Using Code First first

Traditional ways of software development focus on DB-first implementation methodology. But we are in the realm of latest developments and ORM models has taken us to a level that is was a complex ordeal some years back. Eventhough a thorough domain/ERD based approach provides some advantages, there are far more overall improvements to development and…