1

I have a question about Entity Framework. I am no expert on it and only started using it recently but I'm a little confused by it.

Basically I have updated a stored procedure to now returns an extra column of data. I can execute this stored procedure in SQL Server and pass it custom data and it returns showing the column.

However in Visual Studio when I update model from database I don't get the column. Has anyone experienced this problem before?

Things I've tried include:

  1. Run context.tt custom tool
  2. Rerun update model from database.
  3. Check to make sure the stored procedure is running correctly.

I am using Visual Studio 2015 and Entity Framework 5.0 for your fyi. I appreciate any help with this issue. Thanks again

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Seamy
  • 287
  • 4
  • 14
  • I posted an answer but was wrong... check out this: http://stackoverflow.com/questions/39356566/add-stored-procedure-to-entity-framework – Steven Mays Sep 06 '16 at 20:29
  • Cool I'll try that..... I'll let you know if it works – Seamy Sep 06 '16 at 20:35
  • Actually I'll try this but I'm not sure will it work cause my stored procedure is running it's just when I update it it's not being imported into the project. – Seamy Sep 06 '16 at 20:37
  • Did you try to delete it out of EF and add it again? EF is a fickle beast. – Steven Mays Sep 06 '16 at 20:38
  • Ya I tried that but it didn't work... I got it in the end by individually going into my context.tt file and specifically choosing the procedure I was trying to update. – Seamy Sep 06 '16 at 21:04

1 Answers1

0

I got it in the end by individually going into my context.tt file and specifically choosing the procedure I was trying to update.

Seamy
  • 287
  • 4
  • 14