Biodata ba kamo?
end term requirement in elective 4
23FEB2014
CRUD Create, Update, Delete Operations + Searching in MVC 2 VB
posted in biodata, CRUD, MVC, searching, VB by joannamarielm This article describes how to perform basic CRUD Create, Update, Delete operations + Searching in
an MVC 2 application using Entity Framework 4.
The purpose of this tutorial is to give a sense of “what it is like” to build an ASP.NET MVC application. In this tutorial, we’ll show you how to build a simple database-driven application that illustrates how
you can list, create, delete, and edit database records. But first, let’s have a short introduction about MVC and Entity Framework.
I. MVC
Model: is an object representing data or even activity, e.g. a database table or even some plant-floor production-machine process.
View: is some form of visualization of the state of the model. Controller: offers facilities to change the state of the model.
To implement MVC in .NET we need mainly three classes View, Controller and the Model.
II. ENTITY FRAMEWORK
Let’s have a look at the standard definition of Entity Framework given by Microsoft: “The Microsoft ADO.NET Entity Framework is an ObjectRelational Mapping ORM framework that
enables developers to work with relational data as domain-specific objects, eliminating the need for most of the data access plumbing code that developers usually need to write. Using the Entity
Framework, developers issue queries using LINQ, then retrieve and manipulate data as strongly typed objects. The Entity Framework’s ORM implementation 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.”
In simple terms, Entity Framework is an ObjectRelational Mapping ORM framework. It is an enhancement to ADO.NET, an upper layer to ADO.Net that gives developers an automated
mechanism for accessing and storing the data in the database.
Because our goal is to keep things simple, we’ll build a very simple Biodata Database application. Our simple Biodata Database application will allow us to do three things:
List a set of biodata database records Create a new biodata database record
Edit an existing biodata database record Delete an existing biodata database record
Search for an existing biodata database record Viewing of Biodata
In order to create our application, we need to complete each of the following steps: Create the ASP.NET MVC Web Application Project
Create the database Create the database model
Create the ASP.NET MVC controller Create the ASP.NET MVC views
IV. PRELIMINARIES