.Net Links

Thursday, May 10, 2012

Biztalk Errors and solutions

Click Me

Labels: , ,

Saturday, May 5, 2012



Debugging Asp.net application using XML Serialization




Click Here

Labels: , ,

Tuesday, April 24, 2012

Entity Framework


What is the Entity Framework?
• Entity Framework (EF) is an object-relational mapping (ORM) framework for the .NET Framework.
• It abstracts the relational (logical) schema of the data that is stored in a database and presents its conceptual schema to the application.
History
• Entity Framework (EFv1) was included with .NET Framework 3.5 Service Pack 1 released on 11 August 2008
• The second version of Entity Framework, named Entity Framework 4.0 (EFv4), was released as part of .NET 4.0 on 12 April 2010
• A third version of Entity Framework, version 4.1, was released on April 12, 2011
Advantages
1.Basically the Entity Data Models that are built using the Entity Framework. It is going to be the centerpiece of communications with several technologies.
2.This enables developers to “model” the data for their application without changing the actual database
For more details of this topic, please read this article

Thanks to ChandraDevs Blog

Labels: , , , , , , , ,

Data Access Technologies - Should I use ADO, LINQ, nHibernate or the Entity Framework?

Click here

Labels: , , , ,

Monday, April 2, 2012

Scope of Static and Local Variable by an Example


Program





using System;
using System.Collections.Generic;
using System.Text;


namespace Winform_Events
{
     
    class Static_Variables
    {
       private static int x = 1;

       public static void Main(string[] args)
        {
            int x = 5; // method's local variable x hides static variable x


            Console.WriteLine("local x in method Main is {0}", x);


            // UseLocalVariable has its own local x
            UseLocalVariable();


            // UseStaticVariable uses class Scope's static variable x
            UseStaticVariable();


            // UseLocalVariable reinitializes its own local x
            UseLocalVariable();


            // class Scope's static variable x retains its value
            UseStaticVariable();


            Console.WriteLine("\nlocal x in method Main is {0}", x);
            Console.ReadLine();
        }


       public static void UseLocalVariable()
       {
            
           int x = 25; // initialized each time UseLocalVariable is called


           Console.WriteLine("\nlocal x on entering method UseLocalVariable is {0}", x);
           ++x; // modifies this method's local variable x
           Console.WriteLine("local x before exiting method UseLocalVariable is {0}", x);
       } // end method UseLocalVariable


       // modify class Scope's static variable x during each call
       public static void UseStaticVariable()
       {
          
           Console.WriteLine("\nstatic variable x on entering {0} is {1}","method UseStaticVariable", x);
             x *= 10; // modifies class Scope's static variable x
           Console.WriteLine("static variable x before exiting {0} is {1}","method UseStaticVariable", x);
       } // end method UseStaticVariable


    }
}



O/P
local x in method Main is 5


local x on entering method UseLocalVariable is 25
local x before exiting method UseLocalVariable is 26


static variable x on entering method UseStaticVariable is 1
static variable x before exiting method UseStaticVariable is 10


local x on entering method UseLocalVariable is 25
local x before exiting method UseLocalVariable is 26


static variable x on entering method UseStaticVariable is 10
static variable x before exiting method UseStaticVariable is 100


local x in method Main is 5

Labels: , , , ,

Monday, December 26, 2011

MVC - Sample Application

You can start here with building sample applications in MVC 


Click Here

Labels: , , , ,

Friday, December 23, 2011

Apppool vs Appdomain


Apppool Vs appdomain


Let me tell what an application pool is.

Application pools are used to separate set of IIS worker processes that share the same configuration. Applicationpools enable us to isolate our web application for better security, reliability, and availability. The worker process serves as the process boundary that separates each application pool so that when one worker process orapplication is having an issue, other applications or worker processes are not affected.

Application pool and AppDomain both of them can provide isolations.
Application Pool is in IIS whereas AppDomain is a in .NET.

Application pool use the process to isolate the applications which works without .NET.
AppDomain is another isolation methods provided by .NET.



An AppDomain contains InProc session state.So if an AppDomain is killed/recycled, all of your session state information will be lost.
Applications can have multiple AppDomains in them although often times there is a one-to-one relationship between them.

Labels: , , ,