ASP.NET MVC website for Mobile using Oracle DB

This application provides a live demo of developing an mvc 2 web application using Oracle 11g as backend. The prerequisites of the lab is:

1. Microsoft Visual Studio 2010 (Ultimate, Premium, Professional) with .NET Framework 4.0

2. Microsoft Visual Studio 2008 (with MVC 2.0,3,0 plugins installed).

3. Oracle Data Provier (ODP.Net) for Visual Studio supporting entity Framework with Linq. Download here:

4. Oracle 11g.

5. Windows Phone 7 SDK , Opera Mobile Browser 11.e

The MVC application is build with Model, View , Controller infrastructure in ASP.Net Applications. Controllers present the code – behind logic like webforms where as view represents the UI layer. The model encapsulates the business logic & data embedded within the database.

  • To start the application click on visual studio File -> New -> Project – > Web.
  • Select ASP.NET MVC 2 website & select a name of your application.
  • Click on finish after providing Solution name, location.
  • Connect to Oracle database by providing the user name & password . To implement it click on view -> Server Explorer->Check the ODP.NET Add Connection.(Please note : if you have installed Oracle Data Provider for Visual studio for EF & Linq, it will open the ODP.Net Add connection property on clicking add connection property )
  • Select the DataSource Name . (Please Note: in case of Oracle local database provider residing on same computer , you can select ‘(Local Database)’ otherwise for remote database Select your data source name updated in ‘tnsnames.ora’ file.
  • Provide the user name & password & click on test connection button. If it connects successfully then the database will open in Server Explorer.
  • I have created the user ‘Scott’ in Oracle (Local Database) so I opened the tables of Scott user in Oracle. There are some in built tables in Scott users like EMP, DEPT. For this application I have used only the EMP table.
  • Right -Click on EMP table & select ‘Query Window’. write the following query in window.

Select* from EMP; 

Check the output of the query.

  • Start the ASP.NET MVC Project in Visual Studio.
  • Right-Click on Model folder & select ADO.NET Entity Model Framework.
  • Provide a suitable name for the .edmx file. For this project I have provided Employees.edmx.
  • Select the option ‘Select from Database’ Click on Next, Select the ‘Data Connection name’ in this case ‘SCOTT(Local Database)’ & check the radiobutton ‘yes , include sensitive information in connection string’ & check the connection string name in application configuration file.
  • Click on next & select the Model name & provide a suitable model name & select the table, View, Stored Procedure & click on finish.
  • The .edmx file will create the employees.edmx with datacontext  backend files.
  • Right Click on Controller folder select new Controller & provide a name ‘IndexController’ & click on Checkbox ‘Insert, Update, Details’.
  • Click ok & check the Index Controller.cs file.
  • Open the IndexController.cs file & modify it by just mentioning Index() method & creating a object of SCOTTEntities class. Comment out the rest of the code.
  • Build the solution first then right click on Index() method & select Add View to add a new Index view of the application.
  • Provide a name of the view as Index & select the checkbox ‘Create strongly typed view’ & View type select ‘details’.
  • Click finish. The index view will create the normal view with HTML codes.
  • Now click on ‘start Debugging’ or F5 to launch the application.
  • check the output in Opera Mobile emulator on ‘Samsung Galaxy Tab’ view or Windows Phone emulator.

Now the website is ready….


This slideshow requires JavaScript.


Microsoft Web Development Toolkit

Microsoft has launched a web development toolkit compatible with Windows Mobile , I-Phone & BlackBerry. The web application toolkit is designed to demonstrate the how to extend the ASP.NET MVC app to provide Mobile access. To enable mobile access, the web application should have targeted to support each mobile platform.

The ASP.NET MVC web pattern halpes to demonstrate the n-tier enterprise application. The Controller shows the input logic , business logic is implemented in Model where as View is represented by the UI.

The ASP.NET MVC framework is a lightweight, highly testable presentation
framework that is integrated with existing ASP.NET features, such as master
pages and membership-based authentication.

For extending the Web
application to use mobile specific views, this sample provides a reusable
component called MobileCapableViewEngine that enables the Web application to
show the appropriate view depending on the device’s browser that is performing
the request.

To download the toolkit Click on:

Windows Phone 7.5

There is a new edition of Windows Phone has released called Windows Phone 7.5 Mango featured by Microsoft Windows Phone Team.

Features of Mango:

1. Better Web synchronization support of Graphics Processing Unit (GPU) with Interner Explorer 9.

2. Better 3D gaming experience with XNA framework & XBOX.

3. Online Kradle support & storage capability.

Windows Phone 7.5 Codename ‘Mango’ made to downcast BlackBerry, I-Phone 4 & even Android 3.3.

Lets look a better programming & gaming with Windows Phone 7.5 programming!!!




%d bloggers like this: