EmailFactoryFindAllByIds Method |
Find all emails using a list of identifiers.
Namespace:
AskiaPortalCmn
Assembly:
AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax public static IEnumerable<IEmail> FindAllByIds(
IContext context,
IEnumerable<int> ids,
QueryAllFilter filter = QueryAllFilter.NotDeleted
)
Public Shared Function FindAllByIds (
context As IContext,
ids As IEnumerable(Of Integer),
Optional filter As QueryAllFilter = QueryAllFilter.NotDeleted
) As IEnumerable(Of IEmail)
public:
static IEnumerable<IEmail^>^ FindAllByIds(
IContext^ context,
IEnumerable<int>^ ids,
QueryAllFilter filter = QueryAllFilter::NotDeleted
)
Parameters
- context
- Type: AskiaPortalCmnIContext
Context of execution - ids
- Type: System.Collections.GenericIEnumerableInt32
Ids of the email to find - filter (Optional)
- Type: AskiaPortalCmn.CommonQueryAllFilter
Filter to apply on query.
Return Value
Type:
IEnumerableIEmailReturn an object to iterate through the list of emails.
Examples
Find all emails using a list of identifiers.
var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D"));
var contextValidation = context.Validate();
if (!contextValidation.Success)
{
throw contextValidation.Exception;
}
var emails = EmailFactory.FindAllByIds(context, new List<int> {2, 3, 4});
foreach(IEmail email in emails)
{
Console.WriteLine($"Email Id={email.Id}: {email.Name}");
}
See Also