I have just created a database and done my first migration (just a simple table add). Now I want to add some stored procedures which I have just added by writing the sql and executing it in Management Studio. But I would like to include these stored procedures if possible in a migration so that they are saved and I can run an Up or Down method against them. Is this possible and if so what syntax needs to be used? Or will I just have to add/edit/remove them using Management Studio?
相关问题
- sql execution latency when assign to a variable
- MVC-Routing,Why i can not ignore defaults,The matc
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
相关文章
-
EF6 DbSet
returns null in Moq - Entity Framework 4.3.1 failing to create (/open) a
- EF6 code first: How to load DbCompiledModel from E
- Why do I need a ToList() to avoid disposed context
- How to get a list of connected clients on SignalR
- Code for inserting data into SQL Server database u
- Code-First Add-Migration keeps adding the same col
- How do you redirect to the calling page in ASP.NET
I've done this like so...
In the current migration class -
Result, When you view/modify the SP in SQL server, that's why it shows "ALTER PROCEDURE"
I am using EF6 and the
DbMigration
class provides methods to Create/Alter/Delete stored proceduresCreate a new stored procedure
Modify a stored procedure