Text version of the video
http://csharp-video-tutorials.blogspo...
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
/ @aarvikitchen5572
Slides
http://csharp-video-tutorials.blogspo...
Entity Framework - All Text Articles
http://csharp-video-tutorials.blogspo...
Entity Framework - All Slides
http://csharp-video-tutorials.blogspo...
Entity Framework Playlist
• Entity Framework Tutorial
Dot Net, SQL, Angular, JavaScript, jQuery and Bootstrap complete courses
https://www.youtube.com/user/kudvenka...
In this video we will discuss using stored procedures to perform Insert, Update and Delete operations using entity framework code first approach.
public class EmployeeDBContext : DbContext
{
public DbSet[Employee] Employees { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
// This line will tell entity framework to use stored procedures
// when inserting, updating and deleting Employees
modelBuilder.Entity[Employee]().MapToStoredProcedures();
base.OnModelCreating(modelBuilder);
}
}
Entity Framework will create the following stored procedures automatically
Employee_Delete
Employee_Insert
Employee_Update
The default, naming convention for the stored procedures
INSERT stored procedure - EntityName_Insert
UPDATE stored procedure - EntityName_Update
DELETE stored procedure - EntityName_DeleteNote: Insert Stored procedure should return the auto-generated identity column value
Watch video Part 8 Using stored procedures with entity framework code first approach online without registration, duration hours minute second in high quality. This video was added by user kudvenkat 14 May 2014, don't forget to share it with your friends and acquaintances, it has been viewed on our site 139,458 once and liked it 401 people.