Saturday, October 8, 2011

NuGet with multiple projects part-2

Before some days I have posted one post about how we can add NuGet package other than start project. In this post I am going to explain another way of doing that.

Earlier we have use ‘Manage NuGet Package’. Today I am going to use Package Manager Console for that. So let’s take same example which we have used in the earlier post. I have a sample application which have three projects.

MyApplication- Nuget with multiple projects. www.dotnetjalps.com

As you can see in above post there are three projects.
  1. MyApplication-Main Web application project
  2. MyApplication.Business- This project has business logic classes for application
  3. MyApplication.Data- This project has database access layer classes for application
Now I want to add Entity Framework MyApplication.Data Project. As we have to use Package Manager Console. We need to open package manager console you have click Tools->Library Package Manager –>Package Manager Console. Once you click that it will open a console in visual studio like following

.
PackageManagerConsole

Now as I have to type following command in NuGet Package Manager Console to install EntityFramework Package to MyApplication.Data project

Get-Project MyApplication.Data | Install-Package EntityFramework

Here in above command Get-Project will get the project where we have to install the project and Install-Package will install the required package. As you can see entityframework reference added in MyApplication.Data Project in below image.

EntityFrameworkReference

That’s it. Hope you like it. Stay tuned for more.. Till then Happy programming

Namaste!!
Share:
Friday, October 7, 2011

Beware of Plagiarism

I was checking my backlinks on sitemeter today and I have found a blog link which is directly copy my articles from my blog to his blog without giving credits to me. Following is a link for it.

http://learndotnetwithasad.blogspot.com/

This guy has copied my articles blindly event he has copied my new dotnetjalps.com domain post.  I have told this guys to remove the articles but he was not ready to remove this. So I asked Google(Blogger support) to remove content from this link. I have sent DMCA notice to blogger support via this link.

http://www.google.com/support/bin/request.py?contact_type=lr_dmca&product=blogger

After my notice Blogger support team has removed content but still this guy is copying my blog once again.
So please beware of this guy. He can copy your content too.

As a blogger we all are putting so much time to create content and other stuff. We all know that how difficult is to write something.  This blog is for community and you can copy code from here. But please don’t steal or copy my entire content from this as I have done lots of hard word for it. At least give some credits to me. That’s all I want. I hope you can understand .. Stay tuned for more.. There are so many interesting things are coming here.

Namaste!!

Shout it
Share:
Thursday, October 6, 2011

A tribute to Steve Jobs- Chairman, Apple.. A real super hero

Today I heard a sad news for techie world Apple chairman Steve Jobs passed away yesterday night. He was a great men and we would always remember him as a super hero who has brought lots innovations like iPod,iPhone and iPod etc. which changed our lives.

As Apple said on his page. “Apples has lost a visionary and creative genius,and world has lost an amazing human being. Those of us who have been fortunate enough to know and work with Steve have lost a dear friend and inspiring mentor. Steve leaves behind a company that only he could  have built and his spirit will be forever in foundation of apple”.

You can see a great image of him at http://www.apple.com like below with all product as menu like iPhone, iPod,iTunes etc. what  a men he was. My sincere  condolences to his family and Apple family. We always remember him as great men!!.

SteveJobs
“And we’ve all chosen to do this with our lives. So it better be damn good. It better be worth it.” –Steve Jobs
Shout it
Share:
Monday, October 3, 2011

First Review of ASP. NET MVC 4.0 Developer Preview

After so much buzz Microsoft has launched some of the new tools at build conference and ASP.NET MVC 4.0 Developer preview is one of them.

How I can install ASP.NET MVC 4.0 Developer preview?


There are three ways to install ASP.NET MVC 4.0 Developer preview
  1. You can download from following link-
  2. You can install ASP.NET MVC 4.0 Developer preview with web platform installer from following link-
  3. You can also install ASP.NET MVC 4.0 Developer Preview from following link-. If you don’t know about what is NuGet Package. Please visit following link of my blog.

ASP.NET MVC 4.0 and Visual Studio 2010:


There are lots of people thinking that for asp.net mvc 4.0 developer preview, you need to install Visual Studio11 Developer Preview. But that is not true.It works with both. You can also run ASP.NET MVC 4.0 developer preview with side by side with ASP.NET MVC 3.0. You can use any of above method to install asp.net mvc 4.0 developer preview on either of Visual Studio Version.
Creating ASP.NET MVC 4.0 Project with Visual Studio 2010
You can create new asp.net mvc project as same old method like File->New Project and ASP.NET MVC 4 Web Application.

ASP.NET MVC 4.0 Create Project Dialog- First Review

Once you click OK It will open a dialog where it will open a dialog like following.

Internet Application,Mobile Application with ASP.NET MVC 4.0

As you can see now there one more option for mobile application too. So this is one best thing in asp.net mvc 4.0. Now you can create mobile base application also. I will going to post about that in future posts.

Now I want to create Internet application I have selected and Clicked ‘OK’ and created new application. This will create basic mvc application. Now lets run application via F5 and it will look like following in browser.

New Template for ASP.NET MVC 4.0- First Review of ASP.NET MVC 4.0

As you can see in above image in browser Microsoft has given new template for asp.net mvc 4.0. Also there is new contact page in application. I will also going to post about this in future post.

That’s it. This was just a introduction post to ASP.NET MVC 4.0 Developer preview. There are lots of features are available in ASP.NET 4.0. I am going to explorer all this features in future posts. Hope you like it…Stay tuned for more.. Till then Happy programming.

Namaste!!

Shout it

kick it on DotNetKicks.com
Share:
Saturday, October 1, 2011

First Review of Visual Studio11 Developer Preview

Recently before some days at Build Conference on September 14,2011 Microsoft has announced release of “Visual Studio 2011 Developer Preview. You can download that from following link.

http://msdn.microsoft.com/en-us/vstudio/hh127353

I have downloaded the .NET framework 4.5 and Visual Studio11 Developer preview from the above link. First I have installed .NET Framework 4.5 like below.

Microsoft .NET 4.5 Framework Instllation for Visual Studio11 Developer preview

Once after I have installed .NET Framework 4.5. I have installed Visual Studio 11 Developer preview like following.

Installation of Visual Studio 11 Developer Preview

After installing once you load Visual Studio 11 developer preview it will look like following. It is much similar look like Visual Studio 2010.

Start Page of Visual Studio 11 Developer Preview

 

What’s new in Visual Studio11 Developer Preview:

 

There are lots of new features in Visual Studio11 Developer preview let’s go through some of new features like following.

 

Create new project template:

 

New project template is almost same except there are .NET Framework 4.5 selection is also available with other framework 3.5 and 4.0.

New Project dialog for Visual Studio 11 Developer Preview

Solution Explorer:

 

In solution explorer if you compare the stuff there are lots of new feature’s are available. You can see there are lots of Icon there in solution explorer compare to Visual Studio 2010.

Solution Explorer for Visual Studio 11 Developer Preview

Now you can do lots of things with Solution Explorer like Browsing Types,type members, search symbols and find relationship among them. I will explain them all this features in different post.

 

Quick Launch:

 

Another new feature you will notice is a Quick Launch. You can find lots of command and other stuff in visual studio from here. Suppose you want to create a new page then just type new it will give you all the options with new just like following.

Quick Lanuch Feature of Visual Studio 2011 Developer Preview

 

Line Highlighter:

 

Another things I have found is line highlighter in code editor. It will highlight the current line in Editor.

Line Highligher in Visual Studio 2011 Developer Preview

There are so many other features that needs to be discover. I will post that in future posts. Hope you liked it. Stay tuned for more..Namaste!!

Shout it
Share:
Saturday, September 24, 2011

NuGet package with multiple projects

Before some day one of my friend asked me to install NuGet in project another then startup project. At that time I don’t have any idea about it. So I did some R and D on web and found one easiest way to do it. So let’s first create a solution where we have more then one project in single solution. I have created a new solution and create three project in single solution as below.
  1. MyApplication- Main web application project.
  2. MyApplication.Business- This project contains all business logic classes of application
  3. MyApplication.Data- This project contains all data access layers classes of application
Its looks like following.

Nuget Package with multiple solutions and adding NuGet Package to more then one project

Now I want to add EFCodeFirst NuGet package to MyApplication.Data project as I want to use entity framework code first for database operations. To add new package with in the project. you can select project and then click ‘Manage NuGet Packages’ like following.

Manage Nuget Pakcage with multiple project

Once you click it will show a dialog for NuGet Packages  like following.

NuGetPacakge

I have selected EFCodeFirst and Once I clicked ‘Install’ . It has added reference to MyApplication.Data Project like following.

Entity Framework Nuget Package with multiple solution

That’s it. It’s very easy. Hope you like it..Stay tuned for more.. Till then happy programming and Namaste!!!.

Shout it
kick it on DotNetKicks.com
Share:
Wednesday, September 14, 2011

BigInteger in C# 4.0

In C# 4.0 Microsoft has added so many features and I love all most all the features. In today’s post we are going to discuss BigInteger Class. During programming some complex systems often we need a very big numbers. For example if we use some of asymmetrical cryptographic feature which require to use large numbers or we can give simple example of factorial where we sometime reached to limit of data type provided by C# compiler. At that time this BigInteger data type can be very handy. You can store 232 to 264 number in this data type. So its very big and you can copy very very big number in that data type.

So let’s take a simple example to write a factorial program. BigInteger data type comes under System.Numerics namespace. So first we have to add reference to our program to System.Numerics assembly like following.

Big Integer In C# 4.0 - Add Reference to System. Numeric

Now we have added the reference to System.Numeric so we are ready for code. Here in code I have just taken a very large number in big integer which is out of range of integer to test out. So I have assigned ‘39242937852522522’ to big integer object and printed that. Following is a code for that.

using System;
using System.Numerics;

namespace ExperimentConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            BigInteger n = 39242937852522522;
            Console.WriteLine(n);
        }
    }
}
Let’s run code and see output like following as expected its printing value.

Output

If you are run same program with integer it will not compile. It will give ‘Can not covert type long to integer error’. That’s it. Hope you liked it. Stay tuned for more.. Till then happy programming. Namaste!!

Shout it
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