h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Entity Framework 5.0 Features

Entity Framework 5.0 Features

  • This release can be used in Visual Studio 2010 and Visual Studio 2012 to write applications that target .NET 4.0 and .NET 4.5. When targeting .NET 4.5 this release introduces some new features including enum support, table-valued functions, spatial data types and various performance improvements.
  •  If you create a new model using the Entity Framework Designer in Visual Studio 2012, the EF5 NuGet package will be installed to your project and the generated code will make use of EF5. New ASP.NET projects created in Visual Studio 2012 (including MVC projects) also have the EF5 NuGet package installed by default. 
  • The Entity Framework Designer in Visual Studio 2012 also introduces support for multiple-diagrams per model, coloring of shapes on the design surface and batch import of stored procedures.

Define ASP .NET MVC Routing

Define ASP .NET MVC Routing

  • The ASP.NET Routing module is responsible for mapping incoming browser requests to particular MVC controller actions.
  •  ASP .NET Routing is setup in two places 
  •  Web.Config,Global.asax

Expression Blend

Welcome to Expression Blend:
Expression Blend 2.0

  •          Introducing Microsoft Expression Blend 2, a full-featured professional design tool for creating engaging and sophisticated user interfaces for Windows Presentation Foundation (WPF) and Microsoft Silverlight applications. Expression Blend lets designers focus on creativity while letting developers focus on programming. 
  •           In Expression Blend, you design your application visually, drawing shapes, paths, and controls on the artboard, and then modifying their appearance and behavior. You can import images, video, and sound. In Windows-based applications, you can also import and change 3D objects.
  •         Silverlight 2 is supported in Expression Blend 2 with Service Pack 1 installed. You can import graphics and Extensible Application Markup Language (XAML) resources that are generated by Microsoft Expression Design 2 into your Expression Blend 2 project. You can also import Silverlight media projects that were created in Microsoft Expression Encoder 2, to add new features or visual elements to the project, or to modify the media player template that can be reused in Expression Encoder 2.
  •         In Microsoft Expression Web 2, you can import Silverlight 1.0 websites and compiled Silverlight 2 application files into an existing or new project, and then publish your work. 
  •         Microsoft Visual Studio 2008 works seamlessly with Expression Blend 2 to automatically update code-behind files in your project when you specify events to listen for. From the Project panel in Expression Blend 2, you can open individual code-behind files or your whole project. You can also use the deployment tools of Visual Studio 2008 to deploy your applications. 
  •        Expression Blend produces Windows Presentation Foundation (WPF) applications, Silverlight 1.0 websites, and Silverlight 2 user controls (.xap and supporting files). Your visual design is represented by XAML. Just as HTML is the markup language for web applications, XAML is the markup language for WPF. 
  •       Blend is mainly Focused on Creating High Quality UI. where as Visual Studio for WPF/Silverlight is Mainly Focused on EventHandlers / Coding.
Advantages of Expression Blend

  1. DRAWING vector art, paths, etc 
  2. Data binding dialogs with properties and complex options 
  3. Re-templating

Entity Framework 5.0 Namespaces

Entity Framework 5.0 Namespaces

  1. System.Data.Entity 
  2. System.Data.Entity.Infrastructure 
  3. System.Data.Entity.Migrations 
  4. System.Data.Entity.Migrations.Builders 
  5. System.Data.Entity.Migrations.Design 
  6. System.Data.Entity.Migrations.History 
  7. System.Data.Entity.Migrations.Infrastructure 
  8. System.Data.Entity.Migrations.Model 
  9. System.Data.Entity.Migrations.Sql 
  10. System.Data.Entity.Migrations.Utilities 
  11. System.Data.Entity.ModelConfiguration 
  12. System.Data.Entity.ModelConfiguration.Configuration
  13. System.Data.Entity.ModelConfiguration.Conventions 
  14. System.Data.Entity.Validation

ADO.NET Tips

ADO.NET
            ADO.NET provides consistent access to data sources such as SQL Server and XML, and to data sources exposed through OLE DB and ODBC. Data-sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, handle, and update the data that they contain.

ADO.NET 2.0 Features
  • Enhancements to the DataSet and Datatable classes. 
  • Optimized DataSet Serialization. 
  • Conversion of a DataReader to a DataSet or a DataTable and vice versa. Data Paging. 
  • Batch Updates — Reduction in database roundtrips. 
  • Asynchronous Data Access. Common Provider Model.
ADO.NET 3.5 Features

  • Expanded Entity Framework (EF 4.0 and 1.0) Support . 
  • Connection Pooling Performance Enhancements . 
  • Increased Breadth of Support.

C# coding Guide

C# coding Guide
Bracing
           Open braces should always be at the beginning of the line after the statement that begins the block. Contents of the brace should be indented by 4 spaces. For example: “case” statements should be indented from the switch statement like this: Braces should never be considered optional. Even for single statement blocks, you should always use braces. This increases code readability and maintainability. Single line statements Single line statements can have braces that begin and end on the same line. It is suggested that all control structures (if, while, for, etc.) use braces, but it is not required.
Spacing
         Spaces improve readability by decreasing code density. Here are some guidelines for the use of space characters within code:

  • Do use a single space after a comma between function arguments. 
  • Do not use a space after the parenthesis and function arguments 
  • Do not use spaces between a function name and parenthesis. 
  • Do not use spaces inside brackets. 
  • Do use a single space before flow control statements 
  • Do use a single space before and after comparison operators 

Naming 
       Follow all .NET Framework Design Guidelines for both internal and external members. Highlights of these include:

  • Do not use Hungarian notation 
  • Do not use a prefix for member variables (_, m_, s_, etc.). If you want to distinguish between local and member variables you should use “this.” in C# and “Me.” in VB.NET. Do use camelCasing for member variables 
  • Do use camelCasing for parameters 
  • Do use camelCasing for local variables 
  • Do use PascalCasing for function, property, event, and class names 
  • Do prefix interfaces names with “I” Do not prefix enums, classes, or delegates with any letter 

Interop Classes 
          Classes that are there for interop wrappers (DllImport statements) should follow the naming convention below:
NativeMethods
           No suppress unmanaged code attribute, these are methods that can be used anywhere because a stack walk will be performed.
UnsafeNativeMethods
            Has suppress unmanaged code attribute. These methods are potentially dangerous and any caller of these methods must do a full security review to ensure that the usage is safe and protected as no stack walk will be performed.
SafeNativeMethods 
           Has suppress unmanaged code attribute. These methods are safe and can be used fairly safely and the caller isn’t needed to do full security reviews even though no stack walk will be performed. All interop classes must be private, and all methods must be internal. In addition a private constructor should be provided to prevent instantiation.
File Organization
        Source files should contain only one public type, although multiple internal classes are allowed
        Source files should be given the name of the public class in the file Directory names should follow the namespace for the class
For example, I would expect to find the public class “System.Windows.Forms.Control” in “System\Windows\Forms\Control.cs"
Classes member should be alphabetized, and grouped into sections (Fields, Constructors, Properties, Events, Methods, Private interface implementations, Nested types) Using statements should be inside the namespace declaration.

Mutable and Immutable string in C#

Mutable and Immutable string in C#

  • Mutable -->means -->change in value
  • Immutable -->means -->No change in value

14 Principles on Total Quality Management

Professional Development – Dr W. Edwards Deming’s 14 Principles on Total Quality Management Dr. Demings’s 14 principles
  • Create a constant purpose toward improvement
  • Adopt the new philosophy
  • Cease dependence on mass inspection
  • Use a single supplier for any one item
  • Improve every process
  • Create training on the job
  • Adopt and institute leadership aimed at helping people do a better job
  • Drive out fear
  • Break down barriers between departments
  • Get rid of unclear slogans
  • Eliminate arbitrary numerical targets
  • Permit pride of workmanship
  • Implement education and self-improvement
  • Make transformation everyone’s job

Event In C#

Event
            Event is a kind of Notification(Information) giving one by one object to perform task. Event handling is not possible without delegate because it is delegate who will be responsible to call Event handler which even is fired.

Partial Class In C#

Partial Class
           we can break a large class code into small pieces by specifying more than one class with same but with partial keyword. In that case those same name classes will not be treated as different classes so when we will made the object of the class, we will get all the method and member for all same name class.