Muhammad Adyl's Blog

  • Home
  • About
  • Slides
  • Categories
    • ASP.Net MVC
    • Web API
    • Node.js
    • Angular.js
    • Android Development
    • NoSQLs
  • Contact

Creating Simple CRUD (Create Retrieve Update Delete) MVC Application Through Model

by Muhammad Adyl Thursday, January 02, 2014 Basic CRUD Create View EF without EF Data Context Scoffolding MVC 4 Relation Less Model VS 2012
For beginners, CRUD Applications are the applications that uses 4 operations for manipulating data. Those 4 operations are Inserting data, Retrieving data, Editing data and Deleting data. You can also find these commands in Databases such as Select, Insert, Delete and Update.

To follow the drill, First Create a New MVC 4 internet Project, "CrudMvcApp". Now goto Models Folder in Solution Explorer, Right Click , goto add Class and name it "Restaurant.cs" and add the following Code.

Create another class file in Model with the name RestaurantContext.cs, yes this is the same file that we have created in our previous exercises, place the following code in it. You need to add namespace for DbContext "using System.Data.Entity;" above your class file. This is the same code that I have used in my previous blog related Code First and Data Annotation.

In order to avoid complexity i am using only one model for time being and without relation simple implimentation of Code First

Goto Controllers Folder in Solution Explorer, Right Click on the folder goto Add > Controller and name the Controller "RestaurantController.cs". From Scoffolding Option Select Template as "MVC Controller with empty read/write actions".

READ MORE
SHARE :

Welcome To Blog








Muhammad Adyl


Microsoft Certified Trainer, and Technical Evangelist in AUC Technologies. Currently working as a Senior Software Engineer @ Afiniti.


Blog Archive

  • ►  2016 (2)
    • ►  March (1)
    • ►  January (1)
  • ►  2015 (1)
    • ►  August (1)
  • ▼  2014 (1)
    • ▼  January (1)
      • Creating Simple CRUD (Create Retrieve Update Delet...
  • ►  2013 (3)
    • ►  May (2)
    • ►  March (1)

Follow Me

Labels

  • .net 4.5
  • .Net Core
  • ASP.NET5
  • Basic CRUD
  • Bower
  • Cloud optimized
  • Cloud-Optimized
  • Code first
  • Create View
  • Cross-Platform
  • Data Annotation
  • Data annotation Schema
  • Dependency Injection
  • DNX
  • easy web service
  • EF
  • EF 5
  • EF 7
  • EF without EF Data Context Scoffolding
  • Fiddler
  • Grunt
  • Gulp
  • Initializer
  • JIT
  • JSON
  • Jump Start
  • Linux
  • MacOS
  • Microsoft
  • MVC
  • MVC 4
  • MVC6
  • npm
  • NuGet
  • OpenSource
  • OWIN
  • POCO
  • Razor
  • RC1
  • Relation Less Model
  • RESTful
  • Roslyn
  • Seeding
  • SignalR 3
  • Visual Studio 2013
  • vNext
  • VS 2012
  • VS 2013
  • VS 2015
  • Web API
  • Web API 3
  • XML
  • Popular
  • Recent
  • Comments
    Implementing Data Annotation with Entity Framework
    Jump Start MVC 4
    Entity Framework 5: Code First Approach
    A basic guide to RESTful Web Service Using Web API 2
    Exploring MVC 6
    Creating Simple CRUD (Create Retrieve Update Delete) MVC Application Through Model
    vNext and ASP.NET 5, Microsoft's OpenSource and Cross-Platform technology.

About Me

My photo
Muhammad Adyl
· More than 5 years’ experience in Development · Proficient and Certified in Microsoft Technology, with some random experience over Android, Node.js, Angular.js, NoSQL, PHP, HTML5, CSS3 and JavaScript. · 2 publication · Volunteer Technology Speaker and Blogger.
View my complete profile

Popular Posts

  • Entity Framework 5: Code First Approach
    This is my first article of MVC 4 Development series, which is based on basic guidance of implementation of the code first approach, initi...
  • Creating Simple CRUD (Create Retrieve Update Delete) MVC Application Through Model
    For beginners, CRUD Applications are the applications that uses 4 operations for manipulating data. Those 4 operations are Inserting data, ...
  • Implementing Data Annotation with Entity Framework
    This post is a second part of the MVC 4 series that discusses implementation of Data Annotation . Before proceeding to the drill, I would f...

Labels

.net 4.5 .Net Core ASP.NET5 Basic CRUD Bower Cloud optimized Cloud-Optimized Code first Create View Cross-Platform Data Annotation Data annotation Schema Dependency Injection DNX easy web service EF EF 5 EF 7 EF without EF Data Context Scoffolding Fiddler Grunt Gulp Initializer JIT JSON Jump Start Linux MacOS Microsoft MVC MVC 4 MVC6 npm NuGet OpenSource OWIN POCO Razor RC1 Relation Less Model RESTful Roslyn Seeding SignalR 3 Visual Studio 2013 vNext VS 2012 VS 2013 VS 2015 Web API Web API 3 XML

Template Created By ThemeXpose & Blogger Templates