Stored procedures in Entity Framework
-
Hi everyone. First i want to ask apologize for my english but it isn't my mother language. But i try my best to explain myself. second i already post it in the .Net Framework section at Question & Answers label, but Henry Minute said to post it here because. My Problem is: I'm building a project using entity framework. The data base is generate by a edmx(database project). To implement business logic i use stored procedures, but i only con map the to parent entity funcions. I can't map stored procedures to an associated table. Thanks
-
Hi everyone. First i want to ask apologize for my english but it isn't my mother language. But i try my best to explain myself. second i already post it in the .Net Framework section at Question & Answers label, but Henry Minute said to post it here because. My Problem is: I'm building a project using entity framework. The data base is generate by a edmx(database project). To implement business logic i use stored procedures, but i only con map the to parent entity funcions. I can't map stored procedures to an associated table. Thanks
give me your sp
Help people,so poeple can help you.
-
give me your sp
Help people,so poeple can help you.
Hi, the problem is not the sp. The problem is i can't map it. I only can map sp to an Entity(stored procedure mapping) that exists in the .edmx file. Ex: sp_insertClient is mapped to the addClient at mapping functions. But imagine that is another table associted with the Client table by a many-to-many association. The intermediate table beetwen them has no entity in the designer model(.edmx file). So, i can not map a sp to that intermediate table. Best regards
-
Hi, the problem is not the sp. The problem is i can't map it. I only can map sp to an Entity(stored procedure mapping) that exists in the .edmx file. Ex: sp_insertClient is mapped to the addClient at mapping functions. But imagine that is another table associted with the Client table by a many-to-many association. The intermediate table beetwen them has no entity in the designer model(.edmx file). So, i can not map a sp to that intermediate table. Best regards
send your data as an xml to the sp as
SET @Sls_Serial = SCOPE_IDINTITY();
DECLARE @insptr Int;
EXEC sp_xml_preparedocument @insptr OUTPUT, @XML;INSERT INTO Sales_Head
SELECT
@Sls_Serial_No
-- ,<other columns>
FROM OPENXML(@insptr,'<element path>',1)
WITH
(<column> <type> '@<attribute name>');EXEC sp_xml_removedocument @insptr
Help people,so poeple can help you.