/// <summary> /// /// </summary> /// <param name="bag"></param> /// <param name="query"></param> /// <returns></returns> public static EntityCollection RetrieveMultiple(this IBag bag, QueryBase query) { var name = query is QueryExpression qex ? qex.EntityName : query.ToString(); bag.Logger.StartSection($"RetrieveMultiple"); var cEntities = bag.Service.RetrieveMultiple(query); bag.Logger.Log($"Retrieved {cEntities.Entities.Count} {name}"); bag.Logger.EndSection(); return(cEntities); }