Entity Framework 4.1 Code First works great creating tables and relationships. Is it possible to create sql views or stored procedure using Code first approach? Any pointers regarding this will be highly appreciated. Thanks a lot!
相关问题
- How to Specify a Compound key in Entity Framework
- Using StoreGeneratedPattern.Identity with database
- Specify a cascading delete for parent / child rela
- Entity Framework 4.1 - Code First: many-to-many re
- Sort LINQ query by child collection's child pr
相关文章
- EF Codefirst validate unique property?
- Does AsQueryable() on ICollection really makes laz
- what is the best practice to set up DbContext in S
- How to add a column to a link table with code firs
- Implement WCF Data Service using the Repository Pa
- How to have different connection string for differ
- Entity Framework 4.1 - TPT Eager Loading - “The Re
- Why is MVC3 not scaffolding my foreign key columns
To expand on bbodenmiller's answer, In Entity Framework 6, the DbMigration class has methods such as AlterStoredProcedure which allow for modification of stored procedures without having to drop all the way down to raw SQL.
Here's an example of an
Up()
migration method which alters an existing SQL Server stored procedure named EditItem which takes three parameters of typeint
,nvarchar(50)
, andsmallmoney
, respectively:On my machine, this migration script produces the following SQL: