Month: June 2024

  • Blog
  • Month: June 2024

Getting Started with NHibernate and ASP.NET MVC- CRUD Operations

In this post we are going to learn how we can use NHibernate in ASP.NET MVC application. ORMs(Object Relational Mapper) are quite popular this days. ORM is a mechanism to map database entities to Class entity objects without writing a code for fetching data and write some SQL queries. It automatically generates SQL Query for

Stored Procedure-Importing CSV Files into Table -SQL Server

Here is the Stored Procedure code for importing comma seperated CSV files to table. CREATE PROCEDURE [dbo].[sp_ImportScript]@filepath varchar(2000)ASBEGIN TRYdeclare @tmpsql varchar(3000)set @tmpsql=’BULK INSERT table’set @tmpsql=@tmpsql + ‘ FROM ”’ + @filepath + ””set @tmpsql=@tmpsql + ‘ WITH (FIRSTROW=2,FIELDTERMINATOR =’set @tmpsql=@tmpsql + ”’,”’set @tmpsql=@tmpsql + ‘,ROWTERMINATOR =’set @tmpsql=@tmpsql + ”’,”’set @tmpsql=@tmpsql + ‘)’EXEC(@tmpsql)select @@rowcountEND TRYBEGIN CATCHDECLARE

Window Live Mail Lanuch full version

Few days back Microsoft has announced it’s new next generation free mail services windows live mail. Microsoft has announces full version of it. Microsoft also giving beta tester logo for those who have used the Microsoft live beta version of mailing services.

Lazy in C# 4.0

Before C# 4.0 there was no on demand initialization by default. So at the time of declaration we need to create a value or object will be null or we have to create on demand initialization via coding.. But with C# 4.0 we now have lazy class. As per MSDN it support lazy initialization so