Friday, 4 September 2015

Insert, Update, Delete Operation In Asp.Net MVC Using Entity Framework C#.Net.

Insert, Update, Delete Operation In Asp.Net MVC Using Entity Framework C#.Net. How you can perform insert, update, delete operatio... thumbnail 1 summary


Insert, Update, Delete Operation In Asp.Net MVC Using Entity Framework C#.Net.

How you can perform insert, update, delete operation in an mvc application using entity framework by linq using C#.net. This you can use in MVC3, MVC4, MVC5.

SQL Table in  insert some data :-


Step:-1
                first we will create a new asp.net mvc application. if this link i will explain asp.net mvc application for open link.

Step-2:-
             We will Add model folder in class file show below image.




Get Record :-

    Step:-3      
                       we will add a class file in below class code.




Step : - 4 
                        Now we will come to controller and add the below code get list of data . Controller code is as follows:


Step :- 5
                    Now add view for perticular reqirement
                    Right click on action name method-> select Add view -> after open box show below image -> click add button


Step :- 6
                      Now open View for Getcategory and Show the code for given below.



Insert Record:-

Step7:-
           After this again come to you controller. Now we will write code to create a new record.



Step :- 8
              Add view for Insert Action method see above Step-5.
              Now open View for insert and see the code for given below.
                 
       

              
Now we have completed with Insert operation. Now run the page to check the output.

Delete Record:-

step:-9
           In this we have used below mention code to delete the record.



Step:-10


             Now run application and you can see to get record page at run time Now click  delete link after that record will be deleted.

Now we have completed with Delete operation. Now run the page to check the output.

Edit record :-

Step-11:-
                 Now let’s perform some update operation.



Step-12:-
               Add view for Update Action method see above Step-5.
              Now open View for Update and see the code for given below.



Now we have done. Just click on edit link post back will take place and it will display the record in textbox. Just change the record and click on Save button.

Now we have done Insert, Update, Delete Operation In Asp.Net MVC 

Thnx For Watching..........

Download this Code Click Here...

8 comments

  1. please make us to downlaod this code and pdf

    ReplyDelete
  2. ok I will Update it This Post....

    ReplyDelete

  3. Dean Infotech Expert in Asp.Net Development Company India 260+ ASP.NET/VB.NET/C# Developers, Offshore Outsourcing, 15 Yrs Exp.

    ReplyDelete
  4. Dean Infotech one of the top Website Development Company In India, web designing, mobile app development, digital marketing, SEO and SMO company in India.

    ReplyDelete
  5. Nice and really great information. Very helpful for asp.net application development.
    ASP.NET Company India

    ReplyDelete
  6. Thank you for sharing the information here. Its much informative and really i got some valid information. You had posted the amazing article.c# company India

    ReplyDelete
  7. very nice blogs!!! i have to learning for lot of information for this sites...Sharing for wonderful information about the web design and web development.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
    Asp.net developers
    .Net developer freelance

    ReplyDelete