TechBubbles

Archive for September, 2009

CRUD operations using ASP.NET MVC 1

This post explains how to write ASP.NET MVC application which supports create, read, update and delete operations on sample database table. We build a product catalogue application using ASP.NET MVC Web application template.

Download ASP.NET MVC 1 to create the following application

To get the overview on ASP.NET MVC you can read ASP.NET 3.5 MVC Application post

1. Create a ASP.NET MVC Web application by launching VS 2008 and then select

File–>New Project. In project dialogue box enter the project name ProductCatologue and say OK.

clip_image002

Read more

Related Posts:

No comments

.NET Framework 4 File IO Features

New methods are added to the System.IO.File class in .NET framework 4.0 for reading and writing text files.

ReadLines

In earlier version we have used File.ReadAllLines method which returns a string array of all lines in the file.

String[] lines = File.ReadAllLines(“file.txt”);

Read more

Related Posts:

1 comment

.NET Framework 4 SortedSet

You can get the overview on what’s new in .NET FW BCL by reading my post .NET Framework 4 BCL. This post explains about one of the feature SortedSet. .NET Framework 4 adds a new collection to System.Collections.Generic, named  Sorted Set<T>.  It is like HashSet<T>  collection of unique elements, but SortedSet<T> keeps the elements in sorted order.

The Collection is implemented using red-black tree datastructure. Compared to HashSet<T> provides lesser performance for insert,delete and lookup operations. Use this collection if you want to keep the elements in sorted order.

Read more

Related Posts:

No comments

.NET Framework 4 BCL

All .NET developers who uses the BaseClassLibraries can read this post to know what’s New in the .NET FW 4 BCL.  Its not the scope of this post to cover all the features but you can read them on BCL team blog at blogs.msdn.com/bclteam.

The following are the features that you can explore in BCL

  • Code Contracts
  • Parallel extensions
  • Tuples
  • File IO improvements
  • Memory mapped files
  • Sorted Set Collection

Code Contracts

One of the major features added to the .NET FW BCL in version 4 is code contracts. Classes and methods should explicitly state that what they require and what they guarantee if those requirements are met, i.e. their contracts.

Read more

Related Posts:

2 comments

Web Forms model in ASP.NET 4.0

ASP.NET 4.0 platform is built up with various components Web Forms,ASP.NET MVC, Dynamic Data Controls and ASP.NET AJAX. It has the same foundation as in ASP.NET 3.5 SP1 but refined the above features. This post speaks about features in the Web Form model.

         ASP

Read more

Related Posts:

No comments