One way is to use the Database property off the DbContext:
SqlParameter param1 = new SqlParameter("@firstName", "Frank");
SqlParameter param2 = new SqlParameter("@lastName", "Borland");
context.Database.ExecuteSqlCommand("sp_MyStoredProc @firstName, @lastName",
param1, param2);
EF5 definitely supports that.
Related Contents:
- How to call Stored Procedure in Entity Framework 6 (Code-First)?
- Entity Framework Stored Procedure Table Value Parameter
- Getting data from stored procedure with Entity Framework
- Does Entity Framework Code First support stored procedures?
- LINQ to SQL multiple tables left outer join
- Dynamic MySQL database connection for Entity Framework 6
- Error-Attempt by method ‘X.set_DbConnection(System.Data.Common.DbConnection)’ to access method ‘Y.get_Settings()’ failed
- Entity Framework – stored procedure return value
- MySQL Entity Framework Error – The specified store provider cannot be found in the configuration, or is not valid
- MySQL – Entity : The value for column ‘IsPrimaryKey’ in table ‘TableDetails’ is DBNull
- The entity cannot be constructed in a LINQ to Entities query
- ASP.NET MVC – Attaching an entity of type ‘MODELNAME’ failed because another entity of the same type already has the same primary key value
- Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details [duplicate]
- EntityFramework – contains query of composite key
- Solving “The ObjectContext instance has been disposed and can no longer be used for operations that require a connection” InvalidOperationException
- What does principal end of an association means in 1:1 relationship in Entity framework
- Dynamic where clause (OR) in Linq to Entities
- How to create LINQ Expression Tree to select an anonymous type
- Why does the EF 6 tutorial use asynchronous calls?
- Capture Stored Procedure print output in .NET
- Update Row if it Exists Else Insert Logic with Entity Framework [closed]
- Insert/Update Many to Many Entity Framework . How do I do it?
- Circular reference detected exception while serializing object to JSON
- Exception: There is already an open DataReader associated with this Connection which must be closed first
- Get return value from stored procedure
- How can I log the generated SQL from DbContext.SaveChanges() in my Program? [duplicate]
- How to form a correct MySQL connection string? [closed]
- Why doesn’t Include have any effect?
- Entity Framework DateTime and UTC
- Many-to-many mapping table
- No connection string named ‘MyEntities’ could be found in the application config file
- Entity Framework 6 transaction rollback
- Non-static method requires a target
- Lazy Loading vs Eager Loading
- LINQ to Entities only supports casting EDM primitive or enumeration types with IEntity interface
- Entity Framework: How to disable lazy loading for specific query?
- Adding stored procedures complex types in Entity Framework
- Convert DateTime for MySQL using C#
- How to add the same column to all entities in EF Core?
- How to group by on 2 child entities and get total of both this child entities?
- Dynamic query with OR conditions in Entity Framework
- Generate EF orderby expression by string [duplicate]
- Entity Framework And Business Objects
- Setting unique Constraint with fluent API?
- How to COUNT rows within EntityFramework without loading contents?
- An error occurred while saving entities that do not expose foreign key properties for their relationships
- Entity Framework DB-First, implement inheritance
- Database.BeginTransaction vs Transactions.TransactionScope [duplicate]
- Update records using LINQ
- “Context cannot be used while the model is being created” exception with ASP.NET Identity