Posts

Oracle Package

Basically packages is set of procedures, functions, cursors, constraints and exceptions in one unit. To execute the package we write the code as follows: EXECUTE SALARY_PACKAGE.NEW_WORKER('MICE'); In above example SALARY_PACKAGE is package name and NEW_WORKER is procedure name. Creating Package To create package user should have the CREATE PROCEDURE privilege. Two create package two techniques have to be done separetly: (i) Creating package specification A package specification includes list of functions, procedures, variables, constraints,  cursors nd exceptions and will be available for package body. CREATE OR REPLACE PACKAGE <NAME> ------- ------- Above code should be saved in saperate file with saperate name. (ii) Creating package body The name of package body should be equal to name of package specification but file name should be different than above file name.  CREATE OR REPLACE PACKAGE BODY <NAME> -------

Oracle Methods

Method is block of PL/SQL code used to encapsulate the data access method for an object, it is also specified as part of the abstract datatype specification as (CREATE OR REPLACE TYPE  MARKS_TY AS OBJECT) and their body declaration as (CREATE OR REPLACE TYPE BODY MARKS_TY AS MEMBER FUNCTION TOTMARKS()). Before to learn methods it is recommanded to get overview the abstract datatype teqniques.  Creating specification CREATE OR REPLACE TYPE MARKS_TY AS OBJECT (M1 NUMBER(3), M2 NUMBER(3), M3 NUMBER(3), MEMBER FUNCTION TOTMARKS(M1 IN NUMBER, M2 IN NUMBER, M3 IN NUMBER) RETURN NUMBER); In above example, TOTMARKS is declaration of function which will be used later in function calling to get defined.  Defining function (body declaration) CREATE OR REPLACE TYPE BODY MARKS_TY AS MEMBER FUNCTION TOTMARKS(M1 NUMBER, M2 NUMBER, M3 NUMBER) RETURN NUMBER  IS  BEGIN RETURN(M1+M2+M3); END; END; / Creating table using above abstract datatype MARKS_TY CREATE TA

ASP.NET MVC 4 Beta Released Now

After long wait now MVC 4 Beta is available for download, released on 15 Feb 2012. If you are still using ASP.NET MVC 3 or prior version, then check out its new version. ASP.NET MVC 4 is a framework for building scalable, standards-based web applications using well-established design patterns and the power of ASP.NET and the .NET Framework. Top Features ASP.NET Web API Refreshed and modernized default project templates New mobile project template Many new features to support mobile apps Recipes to customize code generation Enhanced support for asynchronous methods Find more details here: http://www.asp.net/mvc/mvc4

Database Programming in MVC 3 in 5 Minutes

Image

@Html.ActionLink() in MVC

Image
In this video you will learn how to use @Html.ActionLink() in MVC. You will also learn how to use images in ActionLink(). 

Using foreach loop in Razor View Engine

Image
In this quick video we are going to take a look at foreach loop in Razor View Engine. 

Model, View and Controller Communications

Image
In this video tutorial you will learn how Model, View and Controller communicates each other.

URL Routing in MVC 3

Image
This Video has 2 parts, when Part-1 will end it will automatically resume Part-2.

Comparison between ViewBag and ViewData in MVC

Introduction In my recent free E-Book titled “ Razor View Engine in MVC 3 ”, written some lines on “ViewBag and ViewData”, a reader named “Krish” asked me a question as follows: Krish: Nice one book to learn MVC and Razor, thanks for it. But the last statement you written "There is no any significant advantage in using ViewBag over ViewData, perhaps a few fewer key strokes, but nothing more." But ViewBag is using the concept of C # 4.0 i.e. dynamic creations of properties which can replace the strongly typed view. What you think about this. Thanks I got the book. And what I replied to him is Author: Nice point to discuss on, it’s a most frequent question in online forums. Look at the difference "ViewData is a dictionary object that you put data into, which then becomes available to the view. ViewData is a deriv

Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity

Customize User's Profile in ASP.NET Identity System

Lambda two tables and three tables inner join code samples