Sunday, July 17, 2011

New Improved IntelliSense with Visual Studio 2010

I have posted lot many things about Visual Studio 2010 features because its a great IDE(Integrated Development Environment).Today I am going to write about IntelliSense improvement in Visual Studio 2010. Today when I was working with Visual Studio 2008 for a old project(Nowadays I am working with Visual Studio 2010), I have found new improve IntelliSense feature in Visual Studio 2010.


Filtering:


Visual Studio 2010 IntelliSense is filtered better than Visual Studio 2008. I have created a sample application and I am writing Console.ReadLine that you can see in following image its filtering with read only.

Intellisense

In earlier version it was not possible.Hope you like it. Stay tuned for more.. Happy Programming..

Shout it

kick it on DotNetKicks.com
Share:
Saturday, July 16, 2011

Introduction to Windows Azure

Recently I have got chance to work with SQL Azure and I loved it. So that’s why Here I am going to start series of post on Windows Azure and SQL Server Azure. In first post of this series I am going to introduce you windows azure platform. I know there are many peoples that may find this post as very beginner level but We all have started from beginner level at some point of time. So It’s better to start at beginner level and then go through step by step overview.

What is Windows Azure:


Well simplest answer in this simple language to above question is “ It’s a operating system which hosts number of services on cloud”. Microsoft has developed this platform to leverage services into the cloud. In azure world you can have application and databases running on cloud. You don’t have to worry about the infrastructure of servers and all other stuff. They will be automatically done by windows azure plate form itself. All you have need to do buy a windows azure services and then developed application with the SDK provided by Microsoft and deploy it. Your application will be ready to serve. You can add multiple instances of server as per your application requirement.

Developing windows azure application is slightly different from normal traditional applications. But developer can still use visual studio 2010 for that. It can also host PHP,Java and other applications also. It does not required to have proprietary software to write application. In fact you can use windows azure with Visual Studio 2010 express edition also.

Roles:

In windows azure everything is based on Roles. There are two kind of roles available for windows azure.
  1. Web Role
  2. Worker Role
Web Role:
You can think web role as web server where we can host our web application or web site. They provide public computers to connect your application like a simple website url i.e. myapplication.cloudapp.net etc. You can run the application with standard HTTP and HTTPS ports also. Even you can have multiple web roles for your single application as per your requirement.
Worker Role:
You can defined Worker Role as some kind of services that works behind the web application. i.e. A window service to create thumbnail of images to display it in web application or a caching service etc. Worker roles are also available outside the world they can talk to any application.

Storage Resources available in Windows Azure:


Azure provide two kind of storage facility In built storage in Azure where we can store data in blobs,queues,tables, drives which are used for following purposes.
  1. Blob- Used to store large amount of data.
  2. Queues-Background work processing
  3. Table- Storage for fast retrieval
  4. Drives-NTFS Formatted page blobs
Windows Azure also provides storage facility with SQL Azure.SQL Azure is a database in cloud where you can almost have all functionalities of SQL Server in cloud. I will cover about above topic in details in forthcoming posts.

All types of roles comes in four verities: Small,Medium, Large and Extra large. All roles are virtual machines. Each represents an increase in pricing and has a different set of specifications that govern how much RAM, local storage space and CPU cores are available to the role as described below:


Size CPU Cores Memory Disk Space for Local Storage Resources
Small 1 1.7 GB 250 GB
Medium 2 3.5 GB 500 GB
Large 4 7 GB 1000 GB
Extra-large 8 14 GB 2000 GB


That’s it. Hope you liked this post. In forthcoming post I am going to explain you can use windows azure in your application with example. Till that stay tuned for more.. Happy programming..


Shout it

kick it on DotNetKicks.com
Share:
Friday, July 15, 2011

Some important attributes in EFCodeFirst

In today’s post I am going to explain some of the important attributes in EFCodeFirst. Whey you do scaffolding with ASP.NET MVC this all attributes are where much important. So Let’s explore all the attributes.

Key Attribute:

When you put this attribute in the class it tell that this property is part of the primary key and If you use code first when its create table based on this entity then it will be a part of primary key of table. Here is the sample example of that.
[Key]

public int ArticleId { get; set; }
Here article ID will act as primary key.

Foreign Key Attribute:

This attribute is very useful when you deal with interrelated tables You can specify the column in entity which is foreign key for that Like following.
[ForeignKey("CategoryId")]

public ICollection<Category> Categories { get; set; }
In above example CategoryId is a foreign key of category table to article table.

ScaffoldColumn Attribute:

When you Scaffold your application with ASP.NET MVC scaffold feature or dynamic data with asp.net webforms this attribute will tell that this column need to have field for that. You can write that column like following.
[ScaffoldColumn(false)]

public int ArticleId { get; set; }
Here it will tell article id will not have UI in scaffoling.

StringLength Attribute:

This attribute is used to specify the maximum length of a string. This attribute is very usefull in validation and other stuff. This attribute only applied to the Stringlength property like following.
[StringLength(512)]

public string Title { get; set; }
Here in the above code it tell that title could not have more then 512 character string.

There lots of other attributes also. I will blog about it in future posts. Hope you liked this. Stay tuned for more..Happy Programming.

Shout it

kick it on DotNetKicks.com
Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews