Category Archives: C#

C# language

What are the differences between “git commit” and “git push”?

Source: https://stackoverflow.com/questions/2745076/what-are-the-differences-between-git-commit-and-git-push

Posted in ASP.NET MVC, C#, Knowledge, Problem solving, Programming, Uncategorized | Leave a comment

What is the best way to paginate results in SQL Server

What is the best way (performance wise) to paginate results in SQL Server 2000, 2005, 2008, 2012 if you also want to get the total number of results (before paginating)? Getting the total number of results and paginating are two … Continue reading

Posted in C#, Database, Knowledge, Problem solving, Programming, Uncategorized | Leave a comment

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