IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace : StoredProcQuery Class |
'Declaration
Public Class StoredProcQuery Implements IEntityQuery, IUntypedEntityQuery, System.ICloneable
'Usage
Dim instance As StoredProcQuery
public class StoredProcQuery : IEntityQuery, IUntypedEntityQuery, System.ICloneable
These queries always use a FetchStrategy of DataSourceOnly, and cannot be used when disconnected from the EntityServer.
You must have already defined a FunctionImport in your Entity Domain Model in order to use the StoredProcQuery; you may not execute a stored procedure defined in your database but unknown to your model.
Note: Stored procedures returning primitive data types are not currently supported, therefore the ElementType must always be an Entity.
// Sample 1 - Directly calling the generated method on your sub-typed EntityManager. private void Sample1() { IdeaBladeTutorialManager mgr = new IdeaBladeTutorialManager(); DateTime dt1 = DateTime.Parse("1/1/1990"); DateTime dt2 = DateTime.Parse("1/1/2000"); var results = mgr.GetSalesByYear(dt1, dt2); } // Sample 2 - Getting the StoredProcQuery from the generated method. private void Sample2() { IdeaBladeTutorialManager mgr = new IdeaBladeTutorialManager(); DateTime dt1 = DateTime.Parse("1/1/1990"); DateTime dt2 = DateTime.Parse("1/1/2000"); StoredProcQuery query = mgr.GetSalesByYearQuery(dt1, dt2); var results = mgr.ExecuteQuery<SalesByYear>(query); }
System.Object
IdeaBlade.EntityModel.StoredProcQuery
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2