Code First Stored Procedure Mapping

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
	modelBuilder.Entity<Student>().MapToStoredProcedures();
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
	modelBuilder.Entity<Student>().MapToStoredProcedures(p => 
		p.Insert(sp => sp.HasName("sp_InsertStudent")
			.Parameter(pm => pm.StudentName, "name")
			.Result(rs => rs.Student_ID, "Student_ID"))
		.Update(sp => sp.HasName("sp_UpdateStudent")
			.Parameter(pm => pm.StudentName, "name"))
		.Delete(sp => sp.HasName("sp_DeleteStudent")
			.Parameter(pm => pm.Student_ID, "Id"))
	);
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
	modelBuilder.Types().Configure(t => t.MapToStoredProcedures());
}
var parameters = new object[1];
context.Ninjas.SqlQuery("GetNinjasByX", parameters);
context.Database.SqlQuery<Ninja>("GetNinjasByX", parameters);
context.Database.SqlQuery(typeof(Ninja), "GetNinjasByX", parameters);

Limitations