c# - Reading data returned from stored procedure -


I have a stored procedure that gives the table (or dataset or view or whatever), it's a < Code> Select ). I use the Entity Framework and I hope that it will make a unit and treat the stored procedure like a table. When I add Praty to unit schema, it is added, but no class has been generated (nothing appears in Schema or Intelligence).

I do not want to use this dataset solution which looks ugly and unaffected:

  SQL Commands SQL Commands = New SQL Commands ("Spodojs Volksco"); SqlCommand.CommandType = CommandType.StoredProcedure; SqlCommand.Connection = New SqlConnection (Settings.Default.ConnectionStringTransit); SqlDataAdapter sa = New SqlDataAdapter (sqlCommand); Dataset dataset = new dataset (); Sa.fill (dataset);   

I've found a line that looks pretty clear:

  var x = context.ExecuteStoreQuery & lt; T & gt; ("Sp_ProjetsVoxco");   

But since the structure of the organization did not generate a class, I'm not sure what to do with T .

I think you have your own edmx file and now you have a The store is trying to add the process that you have already created in the database.

1 - You should add your store process by adding it like any other table using the database update model option, this EF knows about an SP (Because I already have my sp I'm showing the refresh tab, but you will see it in the Add tab of your SP if you have not added them yet)

Entering Image Details Here

Import the 2-function

 Enter the image details here 3 - Give it a <strong> Name </ strong> and a new <strong> complex type </ strong> </ p> <p> <img src =

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -