I started working on an application that uses Entity Framework 5.0 and MVC 4 in VS 2012. The application connects to an existing database, so this is the first database site. So far, everything is working fine. But I have a method that I am writing that should use a function defined on the database side. Let's call it "DoItHaveAThingy" (Guid id, string type), it returns a boolean value. The function works great, working on this database for several years.
So, I open the edmx designer and right-click, then select "Update Model From Database". I select my function and press finish. It adds funcion to Model.Store, you can see it in the model browser. Everything seems to be fine. However, the code is not generated.
I look online and people say that after you have done this step, you need to execute the Import function. So, I right-click on the designer and click Add β Function import. It invokes a dialog in which you add your name to the function. The dialog box also has a drop-down list of functions, you need to select one of them. The problem here is that the dropdown is empty. Therefore, I cannot import the function I need.
I guess I'm doing something wrong. I thought that maybe the emdx file added a function, but with an error. I had this once with the view, checked the file, and next to the view he had a comment with an error message for that view (he did not have a primary key, and then again that represents). But I did not see an error message for the function, it seemed to be added normally.
Was it just this feature? No, I tried another function, int still returns the same parameters. Same problem.
Thanks.
That geeky guy
source share