Friday, May 16, 2014

What is NuGet and how to install it on Visual Studio 2013

NuGet is the package manager for the Microsoft development platform including .NET. The NuGet client tools provide the ability to produce and consume packages. The NuGet Gallery is the central package repository used by all package authors and consumers.

How to install NuGet using Visual Studio Extension Manager :
  • Open Visual Studio, Click Tools and then Extension Manager.
  • Navigate to Online, Find NuGet Manager Extension and click Download
  • In the Installer dialog box, click Install.
  • When installation is complete, close and re-open Visual Studio.

NuGet is now ready to use.

What is Entity Framework ?

Entity framework is an Object/Relational Mapping (O/RM) framework. It is an enhancement to ADO.NET that gives developers an automated mechanism for accessing & storing the data in the database and working with the results in addition to DataReader and DataSet. It eliminates the need for most of the data-access code that developers usually need to write.

It allows you to create a model by writing code or using boxes and lines in the EF Designer. Both of these approaches can be used to target an existing database or create a new database. It also provides services like change tracking, identity resolution, lazy loading, and query translation so that developers can focus on their application-specific business logic rather than the data access fundamentals.

Following figure shows the overall architecture of the Entity Framework (Source : http://www.codeproject.com/)





Application : Application which is going to use Entity Framework.

EDM (Entity Data Model): EDM consist three main parts- Conceptual model, Mapping and Storage model.
  • Conceptual Model: Defines model classes and their relationships.
  • Storage Model: It is your database design model which includes tables, views, stored procedures and their relationships and keys.
  • Mapping: Mapping consist information about how your conceptual model is mapped to storage model.
ADO.Net Provider: This layer communicates with database using standard ADO.Net.

Data Store : Type of database that you are going to use.

Below are the few Step-by-Step tutorials which will give you the better understanding of Entity Framework :



Tuesday, March 18, 2014

How to set permanent IP in Ubuntu ?

Steps :

*) Open the interfaces file :
          sudo vi /etc/network/interfaces

If you are using DHCP you will see the following lines :
          auth eth0
          iface eth0 inet dhcp 


*) To make it static, Change the line iface eth0 inet dhcp to iface eth0 inet static and add the following just below it:

address 10.35.34.209 (IP address that you need to set)
netmask 255.255.255.0 (Default mask which in this case is the default class c subnet)
gateway 10.35.34.1 (Typically your router’s IP address)
network 10.35.34.0 (The network that this machine is running on)
broadcast 10.35.34.255

Here is a screenshot of how it should look below :


*) Once you save this file you need to restart your networking service.
       sudo /etc/init.d/networking restart
or
       sudo service networking restart

Note :
 /etc/init.d/networking restart command is deprecated on new debian and ubuntu, So in such case you can use :
            ifdown eth0 && ifup eth0

How TOPT Works: Generating OTPs Without Internet Connection

Introduction Have you ever wondered how authentication apps like RSA Authenticator generate One-Time Passwords (OTPs) without requiring an i...