Export (0) Print
Expand All

EntityDataReader.Dispose Method

Releases the resources consumed by this EntityDataReader and calls Close.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method Dispose() Releases all resources used by the current instance of the DbDataReader class. (Inherited from DbDataReader.)
Protected method Dispose(Boolean) Releases the resources consumed by this EntityDataReader and calls Close. (Overrides DbDataReader.Dispose(Boolean).)
Top

SQL Server puts output parameters from stored procedures at the end of the result stream, after all the result sets. Therefore, to get output parameter values, an application must consume all the records in all the result sets. If the application closes the EntityDataReader (which would also close the DbDataReader), output parameters might not be populated.

EntityDataReader does not implicitly consume result sets to make output parameters available. Therefore, note the following:

Community Additions

ADD
Show:
© 2014 Microsoft