Tag: Databinding

Handling Multiple Result (Shapes) from SPROCs

Handling Multiple Result Shapes from SPROCs [Function(Name = “spGetWebAccount”)] [ResultType(typeof(Client))] [ResultType(typeof(User))] [ResultType(typeof(UA_User))] public IMultipleResults spGetWebAccount(System.Nullable<Int64> ClientID, System.Nullable<Int64> UserID) { IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), ClientID, UserID); return (IMultipleResults)result.ReturnValue; } Source : http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx

[LINQ] The query results cannot be enumerated more than once (using databinding…)

When you bind the ISingleResultfor the first time, the results are enumerated and the data object is populated. When you bind the same ISingleResult instance to the same control again, it detects that the data-source is the same as its last source (by comparing their object references) and does not enumerate the ISingleResult instance for […]