0

I am using Entity Framework version 6, I included to the edmx model a stored procedure which in that moment returned 2 fields, a Username and one Id, now I need to add another field, so I added it to my stored Procedure, I went to the edmx model, I did right click on a blank space, I did click on "Update Model from Database" and then I did choose my stored procedure, when I try to use the new field, Visual Studio throws me an error, that field does not exists.

So I search for the answer here and here, the last thing I did was to delete the model and create again but it doesn't work, but I am sure my store procedure throws a result set with 3 fields.

This is the Error: 'AsoserData.NS_sp_inicioSesion_Result' no contiene una definición de 'usu_id' ni se encontró ningún método de extensión 'usu_id' que acepte un primer argumento de tipo 'AsoserData.NS_sp_inicioSesion_Result' (¿falta una directiva de uso o una referencia de ensamblado?)

Community
  • 1
  • 1
MelgoV
  • 661
  • 8
  • 21
  • 1
    Show the exact exception. Ensure you're talking to the correct database. – CodeCaster Feb 26 '15 at 20:29
  • I added to the question. – MelgoV Feb 26 '15 at 20:32
  • Yes, I am sure is the same database I create a new Table and the wizard to update the model shows me the new table. – MelgoV Feb 26 '15 at 20:34
  • So it doesn't throw an error, it shows a compile-time error that the property you try to use doesn't exist? – CodeCaster Feb 26 '15 at 20:36
  • Yes Visual studio shows me the error in the error list. – MelgoV Feb 26 '15 at 20:39
  • Have you rebuilt your data access layer project since changing the edmx? – Wyatt Earp Feb 26 '15 at 20:40
  • try to delete the stored procedure from the edmx and build the project and then add the procedure again to the edmx – Monah Feb 26 '15 at 20:44
  • Yes, I deleted the project and created again, and also delete the stored procedure and created it again, I am new on this I have this, an a principal project mvc 4 and a second project called Asoser Data in which is the data model and the EF6, In my models classes I added the field also. – MelgoV Feb 26 '15 at 20:47

0 Answers0