EmailFactoryFindAllForUser Method |
Find all emails available for the specified user.
Namespace:
AskiaPortalCmn
Assembly:
AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax public static IEnumerable<IEmail> FindAllForUser(
IContext context,
IUser user,
QueryAllFilter filter = QueryAllFilter.NotDeleted
)
Public Shared Function FindAllForUser (
context As IContext,
user As IUser,
Optional filter As QueryAllFilter = QueryAllFilter.NotDeleted
) As IEnumerable(Of IEmail)
public:
static IEnumerable<IEmail^>^ FindAllForUser(
IContext^ context,
IUser^ user,
QueryAllFilter filter = QueryAllFilter::NotDeleted
)
Parameters
- context
- Type: AskiaPortalCmnIContext
Context of execution - user
- Type: AskiaPortalCmnIUser
User for who to find available emails. - 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 available for the specified user.
var context = ContextFactory.CreateByUserGuid(Guid.Parse("20BE5F84-F006-49A0-9674-4B16A090AF2D"));
var contextValidation = context.Validate();
if (!contextValidation.Success)
{
throw contextValidation.Exception;
}
var emails = EmailFactory.FindAllForUser(context, context.User);
foreach(IEmail email in emails)
{
Console.WriteLine($"Email Id={email.Id}: {email.Name}");
}
See Also