Code First in Entity Framework does not support Stored Procedure by default. As there is no designer we cannot even map our stored procs to the entity. There are a many scenario we have seen where we are bound to use stored procedure for any database modifications (insert/update/delete). Here is how we can use stored procedure.
This would finally call the Stored Procedure.
The stored proc used here is very simple
ALTER PROCEDURE [dbo].[stp_InsertEmp]
@Name as VARCHAR(50)
INSERT INTO Emps(Name) VALUES(@Name)
if I have some object to return, How I can do?
its not clear to me. how can we use blog or add comments. actually i m using it for the very 1st time.
Thanks, this is great. But please, next time don't post an image, post code that can be copied!
it should be the same as you do in TSQL