This question is locked. New answers and comments are not allowed.
Hi,
I've a public static method on my SalesPrice class that returns sales prices based on certain parameters.
I've a public static method on my SalesPrice class that returns sales prices based on certain parameters.
public static IList<SalesPrice> GetSalesPricesbyPK(int? SkuUid, SalesTypeEnum? SalesType, string SalesCode, DateTime? StartingDate)
{
IObjectScope scope = ObjectScopeProvider1.GetNewObjectScope();
scope.Transaction.Begin();
string
oql = "SELECT * FROM SalesPriceExtent AS sp";
...
... conditional where clause building
...
IQuery query = scope.GetOqlQuery(oql);
IQueryResult result = query.Execute();
return ????????;
I have 3 questions.
1. Should i be passing in my scope object from the calling webpage to the method? Is this the best practice?
2. How do i convert from an IQueryResult to an IList<> ?
3. When is the best time to dispose the IQueryResult? If I dispose it how do i return it?
Thanks!