New Article-File I/O Using C#

January 8th, 2014 | Posted by Vidya Vrat in .NET | C# - (0 Comments)

File handling is a very crucial and important feature to many enterprise applications around us. To support this feature Microsoft .NET Framework offers the System.IO namespace, which provides various classes to enable the developers achieve I/O functionality.

In this article, you will learn how to work with classes in the System.IO namespace for reading and writing data to and from files. System.IO also provides features to support manipulation of files and directories on the operating system’s file system.

Objectives

  •  Using File class for reading and writing data.
  •  Using File and FileInfo class to manipulate files.
  •  Using DirectoryInfo and Directory class to manipulate directories.

Read Full Article Here

 

This article explains the most commonly used and must-know SQL Server functions and techniques that help and are handy in daily .NET Development and working with SQL Server Database projects. I found that working knowledge of these functions are very helpful and used very often in software development. Read Full Article Here

Article Covers

  • GETDATE()
  • DATEADD()
  • DATENAME()
  • DATEPART()
  • DATEDIFF()
  • DAY()
  • MONTH()
  • YEAR()
  • DATALENGTH()
  • APP_NAME()
  • HOST_NAME()
  • SYSTEM_USER
  • @@IDENTITY
  • IDENT_CURRENT
  • SET IDENTITY_INSERT
  • sp_defaultdb
  • Sp_Password

 

Using CLR With SQL Server 2012

December 9th, 2013 | Posted by Vidya Vrat in .NET | C# | CLR | SQL Server - (0 Comments)

In this article, I’ll cover the following:

  • Introduction to SQL CLR
  • Choosing Between T-SQL and SQL CLR
  • Enabling SQL CLR Integration
  • Creating a SQL CLR Stored Procedure
  • Deploying a SQL CLR Stored Procedure into SQL Server
  • Executing the SQL CLR Stored Procedure

Introduction to SQL CLR
SQL CLR is a tiny version of the .NET CLR that is integrated into the SQL Server 2005 and onwards. The existence of CLR in SQL Server allows the C# programmers and other .NET compliant language programmers to write database specific business logic in a programming language like C# instead of T-SQL. Let’s understand what type of objects a programmer can create with SQL CLR integration. Read Full Article Here
The following are objects that can be created using SQL CLR:

  • The following types of database objects can be created with SQL CLR Integration:
  • Stored Procedures
  • User defined aggregates
  • Triggers
  • User defined types

 

Agenda

  1. What is Authentication and Authorization?
  2. Understanding Windows Authentication
  3. Types of Windows Authentication
  4. Programmatic Authentication
  5. Impersonation

What is Authentication and Authorization?

In simple words Authentication is the process that addresses the question “Who are you?“. Authentication is done by obtaining a valid username and password on an internet or intranet system. Once a user is authenticated, the system confirms that you match with the identity who you claim to be. However, authentication doesn’t confirm whether you are authorized to access the resource that you might be trying to access; that is done by Authorization.
Authorization addresses the question “What Can You Do?” and this happens after successful authentication. Authorization is the process of verifying that a user is allowed to access a requested resource. Read Full Article Here

 

 

With the release of .NET Framework 4.5 and Visual Studio 2012, a new version of ADO.NET Entity Framework 5.0 was introduced. This article will introduce you to the ADO.NET Entity Framework 5.0 data model, also known as the Entity Data Model (EDM).

EDM is Microsoft’s way of implementing object-relational mapping (ORM). ORM is a way of processing and mapping relational data into a collection of objects, called entities. You will learn more about it, including the advantages of this approach, in this article.

In this article, I’ll cover the following:
•Understanding ADO.NET Entity Framework 5.0
•Understanding the Entity Data Model
•Working with the Entity Data Model

Read Full Article Here…

 

Using LINQ with C# 2012

October 24th, 2013 | Posted by Vidya Vrat in .NET | C# | LINQ - (0 Comments)

LINQ introduces a standard, unified, easy-to-learn approach for querying and modifying data, and can be extended to support potentially any type of data store. Visual Studio 2012 also supports LINQ provider assemblies that enable the use of LINQ queries with various types of data sources including relational data, XML, and in-memory data structures. Read Full Article Here
In this article, I will cover the following:

  • Introduction to LINQ
  • Architecture of LINQ
  • Using LINQ to Objects
  • Using LINQ to SQL
  • Using LINQ to XML

Asynchronous Programming with C# 5.0

August 12th, 2013 | Posted by Vidya Vrat in .NET | C# - (0 Comments)

Because a synchronous method call can create a delay in program flow which turns out to be bad user experience. Hence, an asynchronous approach will be better. Asynchronous method call will return immediately so that the program can perform other operations while the called method completes its work in certain situations.

The asynchronous methods behavior is different than synchronous ones. You call them; they start executing, but return the control back to the thread which called them in no time; while they continue to execute on different thread.

In general, asynchronous programming makes sense in two cases as:
• If you are creating a UI intensive application in which user experience is prime concern. In this case, an asynchronous call allows the user interface to remain responsive. Unlike shown in Figure 1-1.

  • If you have other complex or expensive computational work to do, you can continue; interacting with application UI while waiting for the response back from long running task.  Read Full Article Here…