Category Archives: C#

C# language

All About TransactionScope

1. Introduction TransactionScope is a very special and important class in the .NET Framework. Supporting transactions from a code block is the main responsibility of this class. We often use this class for managing local as well as distributed transactions from … Continue reading

Posted in ASP.NET MVC, C#, Database, Uncategorized | Leave a comment

Moq – Mock Database

Introduction Moq is a very useful framework which easily mocks service calls and methods for your unit testing. This article helps you to understand Moq with respect to mocking a database (i.e. writing unit test cases for your repository project). … Continue reading

Posted in ASP.NET MVC, C#, Database, Uncategorized | Leave a comment

Populating a SelectList from a DataTable

From https://stackoverflow.com/questions/1439374/populating-a-selectlist-from-a-datatable public static SelectList ToSelectList(this DataTable table, string valueField, string textField) { List<SelectListItem> list = new List<SelectListItem>(); foreach (DataRow row in table.Rows) { list.Add(new SelectListItem() { Text = row[textField].ToString(), Value = row[valueField].ToString() }); } return new SelectList(list, “Value”, “Text”); } … Continue reading

Posted in ASP.NET MVC, C#, Uncategorized | Leave a comment

What’s the difference between Architectural Patterns and Architectural Styles?

An Architectural Pattern is a way of solving a recurring architectural problem. MVC, for instance, solves the problem of separating the UI from the model. Sensor-Controller-Actuator, is a pattern that will help you with the problem of actuating in face … Continue reading

Posted in Business Model, C#, Problem solving, Software architecture, Technology, Uncategorized | Leave a comment

Solution architecture: Dev-Test deployment for testing microservice solutions

This architecture represents how to configure your infrastructure for development and testing of a microservices-based system. This solution is built on the Azure managed services: Visual Studio Team Services, Service Fabric and SQL Database. These services run in a high-availability … Continue reading

Posted in ASP.NET MVC, C#, Education and Training, Software architecture | Leave a comment

Running Serverless ASP.NET Core Web APIs with Amazon Lambda

https://aws.amazon.com/blogs/developer/running-serverless-asp-net-core-web-apis-with-amazon-lambda/ One of the coolest things we demoed at our recent AWS re:Invent talk about .NET Core support for AWS Lambda was how to run an ASP.NET Core Web API with Lambda. We did this with the NuGet package Amazon.Lambda.AspNetCoreServer … Continue reading

Posted in C#, Problem solving, Programming, Software architecture | Leave a comment

A Comparison of the Top Four Enterprise-Architecture Methodologies

Nguồn Microsoft A Comparison of the Top Four Enterprise-Architecture Methodologies Roger Sessions ObjectWatch, Inc. May 2007 Applies to: Enterprise Architecture Summary: Twenty years ago, a new field was born that soon came to be known as enterprise architecture. This paper … Continue reading

Posted in ASP.NET MVC, C#, Database, Software architecture | Leave a comment