Stored Procedures in Entities RRS feed

  • Question

  • User-1254308814 posted

    I have a name check that I need to do because I set ValidateRequest to false in the in my insert form. I need to call a stored proc to see if that name exists in the database(CheckNameExists). In the Model designer I add a function import. Now is there a step I am missing, Is this the wrong way to go about things or should I be able to call this method from my code somehow after the function import?


    Friday, October 24, 2008 3:18 PM

All replies

  • User-1005219520 posted

    EF allows you to assign a SP to insert, update, delete, view. This is a very common problem. Marcin proposes a way to check for uniqueness in the validation phase in this post. I prefer to have a custom page (DynamicData\CustomPages\MyCustomPage.aspx) and add a  "check if name is unique" button/callback (Like you see when you join a new forum).

    Friday, October 24, 2008 6:08 PM